Posts

Showing posts from June, 2014

Common Design Pattern

http://mohammadnazmul.blogspot.com/2014/02/design-patterns-gof-design-patterns-are.html Behavioral ·          Strategy  ·          State  http://www.dreamincode.net/forums/topic/185616-design-patterns-state/ ·          Template method   Creational Patterns ·          Factory  ·          Abstract Factory   ·          Singleton  Structural Patterns ·           Proxy ·          Decorator  ·           Adapter /Wrapper ·           Facade                                              (sp) pdaf Repository http://www.remondo.net/repository-pattern-example-csharp/ http://www.codeguru.com/csharp/.net/net_asp/mvc/using-the-repository-pattern-with-asp.net-mvc-and-entity-framework.htm Unit of Work Pattern http://csharppulse.blogspot.com/2013/09/learning-mvc-part-6-generic-repository.html http://www.asp.net/mvc/tutorials/getting-started-with-ef-5-using-mvc-4/implementing-the-repository-and-unit-of-work-patterns-in-an-asp-net-mvc-application Co

Viva-Entity Framework

Image
1.        What is Entity Framework? Entity Framework is an additional layer between application and database that enables the developers to program against the conceptual application model instead of programming directly against the relational storage schema. 2.        Will there be any issues adding a table without primary keys to a data model? Every entity must have a key, even in the case where the entity maps to a view. When you use the Entity Designer to create or update a model, the classes that are generated inherit from EntityObject, which requires EntityKey. So, we have to have a primary key in the table to add it to the data model. 3.        How do you truncate a table using entity data model? Unfortunately Entity Framework doesn't include anything straight forward to handle this. But we can still call a T-SQL statement using entity framework that will still minimizes the developers work. We can call ExecuteStoreCommand() methond on ObjectContext as shown belo