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); }
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); }
public bool Post([FromBody] CitiesWhichIVisitedDTO cities) { _cityService.AddCitiesWhichIVisited(cities); return(true); }
public void Put([FromBody] CitiesWhichIVisitedDTO cities) { _cityService.UpdateCitiesWhichIVisited(cities); }