To read about definitions of Repository patter refer to here or here and then let's begin! I'm gonna to show the using of repository pattern with entityframework in Data access layer. Sorry about the example because it's about product , category , brand , blah blah again! First of all create an interface called IAggregateRoot

  1.    public interface IAggregateRoot
  2.     {
  3.     }
  4. <...

 What is Entity framework !?

MSDN answers to this question :"Entity Framework is an Object Relational Mapper (ORM). It basically generates business objects and entities according to the database tables provides ability to do CRUD operations , relations and etc."

And also about wikipedia's definition : "The Entity Framework is a se...

You know that entity framework has been built to insert records in database one by one and inserting millions of record at a short time is not possible in a regular form. To achieve this kind of goal you should use bulk insert. Keep this simple configuration for an object via entity framework code first approach:

  1.  class Book
  2.     {
  3.         public Guid Id { get; set; }
  4.         public string Name { get; set; }
  5.         public string Author { get; set; }
  6. ...