public static void CodeFirst() { using (BackEndTestContext context = new BackEndTestContext()) { context.Clientes.Add(new Domain.Models.Cliente("Lucinda Gekcs", 28)); context.Clientes.Add(new Domain.Models.Cliente("Miranda Malis", 32)); context.Clientes.Add(new Domain.Models.Cliente("Fagner Moura", 17)); context.Clientes.Add(new Domain.Models.Cliente("Rodolfo Jussso", 39)); context.Clientes.Add(new Domain.Models.Cliente("Fabio Resende", 55)); context.Clientes.Add(new Domain.Models.Cliente("Maria Lucia", 29)); context.SaveChanges(); } }
public Movement Add(Movement movement) { _db.Movements.Add(movement); _db.SaveChanges(); return(movement); }
public int SaveChanges() { return(Db.SaveChanges()); }
public User Add(User user) { _db.Users.Add(user); _db.SaveChanges(); return(user); }
public bool Commit() { return(_context.SaveChanges() > 0); }