Пример #1
0
 public DataBases.Wrapping ConvertToDBWrapping(SharedDataTypes.Wrapping w)
 {
     return(new DataBases.Wrapping
     {
         ID_Wrapping = w.WrappingId,
         Name = w.Name,
         Price = w.Price,
         Image = w.Image,
         ModifyDate = DateTime.Now
     });
 }
Пример #2
0
 public bool InsertWrapping(SharedDataTypes.Wrapping w)
 {
     localDb.Wrapping.Add(converter.ConvertToDBWrapping(w));
     return(localDb.SaveChanges() == 1);
 }