Esempio n. 1
0
 //from dto to dal
 public static Price ToDal(PricesDTO p)
 {
     return(new Price()
     {
         PriceId = p.PriceId,
         NumsUnit = p.NumsUnit,
         PrecentDiscount = p.PrecentDiscount,
         Price1 = p.Price
     });
 }
Esempio n. 2
0
        //from dal-list to dto -list
        public static List <PricesDTO> ListToDTO(List <Dal.Price> lp)
        {
            List <PricesDTO> l = new List <PricesDTO>();

            foreach (Price p in lp)
            {
                PricesDTO x = convertDalToDTO(p);
                l.Add(x);
            }
            return(l);
        }