public void Update(Subject model) { using (IUnitOfWork unitOfWork = new UnitOfWork()) { unitOfWork.getRepository<Subject, int>().Update(model); unitOfWork.Save(); } }
public void addSubject(Subject model) { using (IUnitOfWork unitOfWork = new UnitOfWork()) { unitOfWork.getRepository<Subject, int>().Add(model); unitOfWork.Save(); } }