Esempio n. 1
0
 public IHttpActionResult AddBuilding([FromBody] BuildingDTO building)
 {
     if (string.IsNullOrEmpty(building.Name) || string.IsNullOrEmpty(building.Address))
     {
         return(BadRequest());
     }
     if (_bll.AddBuilding(building))
     {
         return(Ok());
     }
     return(InternalServerError());
 }