コード例 #1
0
 public List <Productos> ObtenerTodos()
 {
     using (var db = new ColmadoContext())
     {
         return(db.Producto.ToList());
     }
 }
コード例 #2
0
 internal void crear(Productos model)
 {
     using (var db = new ColmadoContext())
     {
         db.Producto.Add(model);
         db.SaveChanges();
     }
 }