public async Task CreateAsync(CreateRefIdentityInput input) { var obj = new RefIdentityType { Name = input.Name }; var objExist = _repository.FirstOrDefault(a => a.Name == input.Name); if (objExist == null) { await _repository.InsertAsync(obj); } else { throw new UserFriendlyException("Item Alredy Exist"); } }
public async Task <ActionResult> CreateIdentityType(CreateRefIdentityInput input) { await this.refIdentityAppService.CreateAsync(input); return(RedirectToAction("CreateIdentityType")); }