Guest User

Untitled

a guest
Feb 18th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. public class StudentDetailbs<TEntity> :IStudentbs<TEntity> where TEntity:class
  2. {
  3. IUnitofwork _uow;
  4. //here unitofwork is inejcted
  5. public StudentDetailbs(IUnitofwork iunitofwork)
  6. {
  7. this._uow = iunitofwork;
  8. }
  9. public void Add(TEntity tentity)
  10. {
  11. //now call the studentdetail
  12. StudentDetail objstudentdetail = (StudentDetail)(object)(tentity);
  13. this._uow.StudentRepo.Add(objstudentdetail);
  14. this._uow.Save();
  15. }
  16.  
  17. public IEnumerable<StudentDetail> FetchallStudents()
  18. {
  19. return this._uow.StudentRepo.GetAll();
  20. }
  21.  
  22. }
Add Comment
Please, Sign In to add comment