• mvc routing

    Routing is actually not part of the asp.net mvc component. But mvc depends on this asp.net components. To add a route to the route table, you can use the following code.

  • EF JOIN

    Zlatko Michailov, the Entity SQL program manager at Microsoft, writes in his blog: "A well defined query against a well defined entity data model does not need JOIN. Navigation properties in combination with nesting sub-queries should be used instead. These latter constructs represent task requirements much more closely than JOIN does."—http://blogs.msdn.com/esql/ (November 1, 2007). To show it means, here is an example.

  • Entity Framework stack

    The Entity Framework's most prominent feature set and that which you are likely to work with most often is referred to as Object Services. Object Services sits on top of the Entity Framework stack, and provides all the functionality needed to work with objects that are based on your entities. Object Services provides a class called EntityObject and can manage any class that inherits from EntityObject. This includes materializing objects from the results of queries against the EDM, keeping track of changes to those objects, managing relationships between objects, and saving changes back to the database.

  • What is a good unit test

    A unit test should have the following properties:

    1. It should be automated and repeatable.
    2. It should be easy to implement.
    3. Once it’s written, it should remain for future use.
    4. Anyone should be able to run it.
    5. It should run at the push of a button.
    6. It should run quickly.
  • IRequiresSessionState

    Be default, your page does not implement IRequireSessionState, so your page should not be able to access HttpContext.Current.Session. But why you can always use that it? It is because the asp.net compiler and code generator modify your page to support the interface, so you don't need to explicitly implement this interface your page.