public void CriarCliente(long userID, string userName) { using (GccContext db = new GccContext()) { Cliente cliente = new Cliente(); cliente.UserId = userID; cliente.Nome = userName; cliente.Endereco = new Endereco(); db.Clientes.Add(cliente); db.SaveChanges(); } }
public UnitOfWork(GccContext context) { _context = context; }
public UnitOfWork() { _context = new GccContext(); }