About 36 hours ago, I just complained how painful as a Microsoft tech developer. Why I complained just because I have to maintain my Microsoft development skills on 4 different tech (they are really different): Windows Forms, WPF, ASP.NET Web Forms, ASP.NET MVC. I mean: I have to follow the new tech everyday, even every [Read More ...]
An ASP.NET MVC3 project, using code first. followed Microsoft tutorial “Getting Started with EF using MVC”. When we tried to change models, we often got the following error: Model compatibility cannot be checked because the database does not contain model metadata. Ensure that IncludeMetadataConvention has been added to the DbModelBuilder conventions. I have a Initial [Read More ...]
Microsoft’s Entity Framework now released at least 4 or even 5 main versions, there are many new stuff should to learn for most of Microsoft tech programmers who want to turn to MVC and Entity Framework. Here I record one small point: One difference about Entity State in desktop application and in web application: Normally [Read More ...]
Here is a simple sample for how to add dynamic output in MVC using ViewBag: In Controller: public class HomeController : Controller { public ActionResult Index() { int hour = DateTime.Now.Hour; ViewBag.Greeting = hour < 12 ? "Good morning" : "Good afternoon"; return View(); } } In View: @{ ViewBag.Title = "Index"; } <h2>Index</h2> <div> [Read More ...]
We have a small MVC project, once a time we got the following error message in a popup window: …. Unable to find the requested .Net Framework Data Provider. It may not be installed. The reasons are very depends, there are lots of different reasons on the internet. Our case looks some special: The reason [Read More ...]