public async Task <BuildingUnits> Create(BuildingUnits entity) { var buildingUnit = _repositoryBuildingUnits.FirstOrDefault(BU => BU.Id == entity.Id); if (buildingUnit != null) { throw new UserFriendlyException("Building Unit is already exist"); } else { return(await _repositoryBuildingUnits.InsertAsync(entity)); } }
public void Update(BuildingUnits entity) { _repositoryBuildingUnits.Update(entity); }