コード例 #1
0
 public bool UpdateCitiesWhichIVisited(CitiesWhichIVisitedDTO citiesWhichIVisited)
 {
     using (_uow)
     {
         var tempCitiesWhichIVisited = _uow.CitiesWhichIVisitedRepository.GetById(citiesWhichIVisited.Id);
         tempCitiesWhichIVisited.CityId = citiesWhichIVisited.CityId;
         _uow.CitiesWhichIVisitedRepository.Update(tempCitiesWhichIVisited);
         _uow.Save();
     }
     return(true);
 }
コード例 #2
0
 public bool AddCitiesWhichIVisited(CitiesWhichIVisitedDTO citiesWhichIVisited)
 {
     using (_uow)
     {
         CitiesWhichIVisited tempCitiesWhichIVisited = new CitiesWhichIVisited();
         tempCitiesWhichIVisited.CityId = citiesWhichIVisited.CityId;
         tempCitiesWhichIVisited.Id     = citiesWhichIVisited.Id;
         _uow.CitiesWhichIVisitedRepository.Insert(tempCitiesWhichIVisited);
         _uow.Save();
     }
     return(true);
 }
コード例 #3
0
 public bool Post([FromBody] CitiesWhichIVisitedDTO cities)
 {
     _cityService.AddCitiesWhichIVisited(cities);
     return(true);
 }
コード例 #4
0
 public void Put([FromBody] CitiesWhichIVisitedDTO cities)
 {
     _cityService.UpdateCitiesWhichIVisited(cities);
 }