public async Task <CRN> Create(CRN entity) { var crn = _repositoryCRN.FirstOrDefault(x => x.Id == entity.Id); if (crn != null) { throw new Abp.UI.UserFriendlyException("CRN Already exist"); } else { return(await _repositoryCRN.InsertAsync(entity)); } }
public void Update(CRN entity) { _repositoryCRN.Update(entity); }