public CangooruResponse EditLocation(DTO.LocationDTO dto)
 {
     try
     {
         _repository.EditUserLocation(new Repositories.cangooru_Location
         {
             Id               = dto.locationId,
             Address          = dto.Street + " , " + dto.Number,
             AddressExtraInfo = dto.More,
             CEP              = dto.CEP,
             Neightborhood    = dto.Neighborhood,
             UserAccountId    = dto.UserAccountId,
             ContactName      = "",
             LocationType     = 1,
             RegionId         = new Guid("815B3E05-A73C-4FD7-92D7-46B96924322B")
         });
         return(new CangooruResponse {
             Status = RequestStatus.Success, Values = null
         });
     }
     catch
     {
         return(new CangooruResponse {
             Status = RequestStatus.Fail, Values = null
         });
     }
 }
        public CangooruResponse GetLocationById(Guid locationId)
        {
            var location    = _repository.GetLocationsById(locationId);
            var locationDto = new DTO.LocationDTO
            {
                CEP          = location.CEP,
                More         = location.AddressExtraInfo,
                Neighborhood = location.Neightborhood,
                Number       = location.Address.Split(',')[1].Trim(),
                Street       = location.Address.Split(',')[0].Trim(),
                UF           = location.cangooru_Region.State,
                City         = location.cangooru_Region.Name,
                locationId   = location.Id
            };

            return(new CangooruResponse {
                Status = RequestStatus.Success, Values = locationDto
            });
        }
 public CangooruResponse GetLocationById(Guid locationId)
 {
     var location = _repository.GetLocationsById(locationId);
     var locationDto =  new DTO.LocationDTO
     {
         CEP = location.CEP,
         More = location.AddressExtraInfo,
         Neighborhood = location.Neightborhood,
         Number = location.Address.Split(',')[1].Trim(),
         Street = location.Address.Split(',')[0].Trim(),
         UF = location.cangooru_Region.State,
         City = location.cangooru_Region.Name,
         locationId = location.Id
     };
     return new CangooruResponse { Status = RequestStatus.Success, Values = locationDto };
 }