예제 #1
0
        // create new building in table buildings .
        public async Task <Buildings> create(Buildings entity)
        {
            var building = _repositoryBuildings.FirstOrDefault(x => x.Id == entity.Id);

            if (building != null)
            {
                throw new UserFriendlyException("Building is already exist");
            }
            else
            {
                return(await _repositoryBuildings.InsertAsync(entity));
            }
        }
예제 #2
0
 public void update(Buildings entity)
 {
     _repositoryBuildings.Update(entity);
 }
예제 #3
0
 public async Task <Buildings> updateAsync(Buildings entity)
 {
     return(await _repositoryBuildings.UpdateAsync(entity));
 }