Пример #1
0
        public static PanierView CreatePanier(this DBEntities DB, PanierView panierView)
        {
            Panier panier = panierView.ToPanier();

            panier = DB.Paniers.Add(panier);
            DB.SaveChanges();
            return(panier.ToPanierView());
        }
Пример #2
0
 //PANIERS
 public static Panier ToPanier(this PanierView panierView)
 {
     return(new Panier()
     {
         Id = panierView.Id,
         ItemId = panierView.ItemId,
         UserId = panierView.UserId,
         QuantiteAchat = panierView.QuantiteAchat,
     });
 }