コード例 #1
0
 public int QuantidadePorComprador(Comprador comprador)
 {
     try
     {
         return(1);//(from p in db.Pedido where p.comprador == comprador select p).Count();
     }
     catch (Exception)
     {
         return(0);
     }
 }
コード例 #2
0
 public bool Salvar(Comprador comprador)
 {
     try
     {
         db.Entry(comprador).State = EntityState.Modified;
         db.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
コード例 #3
0
 public bool Criar(Comprador comprador)
 {
     try
     {
         db.Comprador.Add(comprador);
         db.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }