コード例 #1
0
 public int GuardarCliente(Models.Cliente cliente)
 {
     context.Entry(cliente).State = EntityState.Added;
     context.SaveChanges();
     return(context.Entry(cliente).Entity.Id_Cliente);
 }
コード例 #2
0
 public int GuardarProducto(Models.Producto producto)
 {
     context.Entry(producto).State = EntityState.Added;
     context.SaveChanges();
     return(context.Entry(producto).Entity.Id_Producto);
 }
コード例 #3
0
 public void IngresarRegalia(Models.Producto producto, Models.Regalias regalia)
 {
     context.Entry(producto).State = EntityState.Modified;
     context.Entry(regalia).State  = EntityState.Added;
     context.SaveChanges();
 }
コード例 #4
0
 public int GuardarUsuario(Models.Usuario usuario)
 {
     context.Entry(usuario).State = EntityState.Added;
     context.SaveChanges();
     return(context.Entry(usuario).Entity.Id_Usuario);
 }