public IActionResult GetAllLocations()
 {
     try
     {
         return(Ok(_mapper.ParseLocation(_locationService.GetAllLocations())));
     }
     catch (Exception)
     {
         return(BadRequest());
     }
 }
Beispiel #2
0
 public Model.Location AddLocation(Model.Location newLocation)
 {
     _context.Locations.Add(_mapper.ParseLocation(newLocation));
     _context.SaveChanges();
     return(newLocation);
 }