コード例 #1
0
        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));
            }
        }
コード例 #2
0
 public void Update(BuildingUnits entity)
 {
     _repositoryBuildingUnits.Update(entity);
 }