예제 #1
0
 public static bool AlterarVaga(Vaga v)
 {
     try
     {
         ctx.Entry(v).State = System.Data.Entity.EntityState.Modified;
         ctx.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(true);
     }
 }
예제 #2
0
 public static bool RemoverVaga(Vaga v)
 {
     try
     {
         ctx.Vagas.Remove(v);
         ctx.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
예제 #3
0
 public static bool AdicionarVaga(Vaga v)
 {
     try
     {
         ctx.Vagas.Add(v);
         ctx.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
예제 #4
0
 public static Vaga VerificarVagaPorId(Vaga v)
 {
     return(ctx.Vagas.FirstOrDefault(x => x.Id.Equals(v.Id)));
 }