public static BeerViewModelDetails ToBeerViewModelDetails(this BeerDto source) { var result = new BeerViewModelDetails { Id = source.Code, Name = source.Description, Graduation = source.Graduation, BeerTypeId = source.BeerTypeId, CountryId = source.CountryId, CityId = source.CityId }; return(result); }
public static BeerDto ModelDetailsToBeerDto(this BeerViewModelDetails source) { var result = new BeerDto { Code = source.Id, Description = source.Name, Graduation = source.Graduation, BeerTypeId = source.BeerTypeDto.Code, CountryId = source.CountryDto.Code, CityId = source.CityDto.Code }; return(result); }