• The Best IoC Container?

    As I previously mentioned in my post “The Best JavaScript Library“, I am in the process of developing an application/writing a book.  I will be using asp.net MVC and a TDD approach to the application and book.  As I have done with the JavaScript framework selection, I decided to look around and evaluate/review my options [...]

  • ASP.NET, ASP.NET MVC

    Posted on July 1st, 2008

    Written by Emad Ibrahim

    Tags

    , ,

    ASP.NET MVC & Threads

    I have a method that handles sending of emails.  I wrote it so that it would run asynchronously, so that it won’t slow down the web app.  It looks like this: protected static void SendMail(string to, string subject, string body) { try { using (var bgw = new BackgroundWorker()) { bgw.DoWork += new DoWorkEventHandler(delegate { [...]

  • ASP.NET, ASP.NET MVC, Testing

    Posted on April 4th, 2008

    Written by Emad Ibrahim

    Tags

    , , , , , , , ,

    Unit Test Linq to Sql in ASP.Net MVC with Moq

    I have just spent the entire day playing with Moq to unit test an asp.net mvc application I am working with. All I wanted to do is test a “create” method that simply adds a record to the database. So here it goes. 1. I created a Mock Http context to be used by my [...]

  • ASP.NET, Programming

    Posted on March 31st, 2008

    Written by Emad Ibrahim

    Tags

    , , , , , ,

    Ajax with ASP.NET MVC Framework Preview 2

    This is the updated version of the Nikhil’s excellent example on how to use Ajax with ASP.net MVC. I commented all the changes made in the code and prefixed them with //emad. So just search for //emad and you will see all the changes I made… Here is a quick list of the changes I [...]

  • Programming

    Posted on February 20th, 2008

    Written by Emad Ibrahim

    Tags

    , ,

    Get Enum Value from String

    Here is a quick tip.  If you have the following Enum Enum Frequencies DAILY WEEKLY MONTHLY End Enum .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, “Courier New”, courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } [...]

  • Older Posts Yeah! There are more posts, check them out.