Пример #1
0
 public BeerType ReverseMap(BeerTypeViewmodel raw)
 {
     return(new BeerType()
     {
         Id = raw.Id,
         Name = raw.Name
     });
 }
Пример #2
0
        public List <BeerTypeViewmodel> MapRange(List <BeerType> raw)
        {
            List <BeerTypeViewmodel> mapped = new List <BeerTypeViewmodel>();

            foreach (var b in raw)
            {
                BeerTypeViewmodel temp = new BeerTypeViewmodel()
                {
                    Id   = b.Id,
                    Name = b.Name
                };

                mapped.Add(temp);
            }

            return(mapped);
        }