public IDataResult <LocationDetailsDto> GetLocationDetailsDtoById(int locationId)
        {
            var location   = _locationDao.Get(l => l.Id == locationId);
            var locAddress = _addressDao.Get(a => a.Id == location.AddressId);

            var locationDetailsDto = new LocationDetailsDto
            {
                LocationId         = location.Id,
                LocationCode       = location.Code,
                LocationName       = location.Name,
                LocationTypeId     = location.LocationTypeId,
                LocationTypeName   = location.LocationTypeId.ToString(),
                IsInternalLocation = location.IsInternalLocation,
                IsReturnLocation   = location.IsReturnLocation,
                IsScrapLocation    = location.IsScrapLocation,
                AddressId          = locAddress.Id,
                AddressTitle       = locAddress.Title
            };

            return(new SuccessDataResult <LocationDetailsDto>(locationDetailsDto));
        }
 public IDataResult <Address> GetById(int id)
 {
     return(new SuccessDataResult <Address>(_addressDao.Get(a => a.Id == id)));
 }