示例#1
0
        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();
            }
        }
示例#2
0
文件: UnitOfWork.cs 项目: Rieth/sggcc
 public UnitOfWork(GccContext context)
 {
     _context = context;
 }
示例#3
0
文件: UnitOfWork.cs 项目: Rieth/sggcc
 public UnitOfWork()
 {
     _context = new GccContext();
 }