public HttpResponseMessage UpdateLocation(Location locationToUpdate)
        {
            locationService.UpdateLocation(locationToUpdate);
            var responnse = Request.CreateResponse(HttpStatusCode.OK);

            return responnse;
        }        
        public HttpResponseMessage PostLocation(Location locationToAdd)
        {
            locationService.CreateLocation(locationToAdd);
            var responnse = Request.CreateResponse<Location>(HttpStatusCode.Created, locationToAdd);

            return responnse;
        }
Exemple #3
0
 public LocationDTO(Location location)
 {
     if (location != null)
     {
         LocationId = location.LocationId;
         Name = location.Name;
         Address = location.Address;
         Active = location.Active;
     }            
 }
 public void UpdateLocation(Location locationToUpdate)
 {
     uow.LocationRepository.Update(locationToUpdate);
     uow.Commit();
 }
 public void CreateLocation(Location locationToAdd)
 {
     uow.LocationRepository.Insert(locationToAdd);
     uow.Commit();
 }