예제 #1
0
        public HttpResponseMessage UpdateLocation(Location locationToUpdate)
        {
            locationService.UpdateLocation(locationToUpdate);
            var responnse = Request.CreateResponse(HttpStatusCode.OK);

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

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