Ejemplo n.º 1
0
 public IActionResult AddEvent([FromBody] AddLocationDto locationDto)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest());
     }
     _locationServices.AddLocation(locationDto);
     return(Ok());
 }
Ejemplo n.º 2
0
        public void AddLocation(AddLocationDto addLocationDto)
        {
            Location @location = new Location()
            {
                Id          = addLocationDto.Id,
                Country     = addLocationDto.Country,
                City        = addLocationDto.City,
                Street      = addLocationDto.Street,
                HouseNumber = addLocationDto.HouseNumber,
                FlatNumber  = addLocationDto.FlatNumber
            };

            _locationrepository.Add(@location);
        }
Ejemplo n.º 3
0
 public async Task <IActionResult> AddLocation(AddLocationDto location)
 {
     return(SetResponse(await _location.AddCity(location.LocationName, location.RegionId)));
 }