public async Task SaveOrUpdateAsync(ReasonForRejection rejection) { using (_unitOfWork) { await _db.ReasonForRejections.AddAsync(rejection); _unitOfWork.Commit(); } }
public async Task UpdateAsync(ReasonForRejection rejection, int?id) { using (_unitOfWork) { if (id != null) { _db.ReasonForRejections.Update(rejection); _db.SaveChanges(); } } }