After Thought

Archive for July 2009

Setting up FubuMVC application on IIS7

leave a comment »

Recently my colleague Weston Binford was trying to set up a FubuMvc application to do a comparison analysis with Mvc. He had some issues with running FubuMvcSampleApplication FubuMvc under IIS7. After much debugging he found out that UrlRoutingModule and UrlRoutingHandler must be added under system.webServer tag.

 <remove name="UrlRoutingModule" />
 <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
 <remove name="UrlRoutingHandler" />
 <add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

Written by shashankshetty

July 29, 2009 at 10:32 am

Posted in C#, Fubu Mvc, FubuMvc, Uncategorized

Tagged with , ,

Now you can insert records into Excel using ExcelMapper

leave a comment »

You can now use ExcelMapper to insert records into Excel as well. Continuing with the same User example, we can insert a User (John Doe) into Excel using ExcelMapper.

IRepository repository = ServiceLocator.Current.GetInstance<IRepository>();

List<User> users = new List<User>
   new User
       Id = 1,
       LastName = "Doe",
       FirstName = "John
       DateOfBirth  = Convert.ToDateTime("2/2/1990")

Note that User DTO was generated using BuildDTOsFromExcel.exe.

repository.Put<User>(User) saves the Users List into Excel. Since we don’t have the concept of unique keys yet, it can only insert and not update.

Written by shashankshetty

July 27, 2009 at 10:11 am

Posted in C#, ExcelMapper, Microsoft Excel

Tagged with , , ,