public int Update(Sesi obj) { var result = 0; using (IDbContext context = new DbContext()) { _repository = new SesiRepository(context); result = _repository.Update(obj); } return(result); }
public Sesi GetLastSession(string userId) { Sesi obj = null; using (IDbContext context = new DbContext()) { _repository = new SesiRepository(context); obj = _repository.GetLastSession(userId); } return(obj); }