示例#1
0
 public IList <BlogEntry> GetAll()
 {
     /* Used UnitOfWork attribute, because GetAll method returns IQueryable<Person>, it does not fetches records from database.
      * No database operation is performed until ToList(). Thus, we need to control connection open/close in this method using UnitOfWork. */
     /* Used UnitOfWork attribute, because when different repositories and all operations must be transactional. */
     return(_repository.GetAll().ToList());
 }