public async Task <InterventionType> Create(InterventionType entity) { var interventionType = _IRepositoryInterventionType.FirstOrDefault(i => i.Id == entity.Id); if (interventionType != null) { throw new UserFriendlyException("interventionType is already exist"); } else { return(await _IRepositoryInterventionType.InsertAsync(entity)); } }
public void Update(InterventionType entity) { _IRepositoryInterventionType.Update(entity); }