Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class StudentDetailbs<TEntity> :IStudentbs<TEntity> where TEntity:class
- {
- IUnitofwork _uow;
- //here unitofwork is inejcted
- public StudentDetailbs(IUnitofwork iunitofwork)
- {
- this._uow = iunitofwork;
- }
- public void Add(TEntity tentity)
- {
- //now call the studentdetail
- StudentDetail objstudentdetail = (StudentDetail)(object)(tentity);
- this._uow.StudentRepo.Add(objstudentdetail);
- this._uow.Save();
- }
- public IEnumerable<StudentDetail> FetchallStudents()
- {
- return this._uow.StudentRepo.GetAll();
- }
- }
Add Comment
Please, Sign In to add comment