Example #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);
     }
 }
Example #2
0
 public static bool RemoverVaga(Vaga v)
 {
     try
     {
         ctx.Vagas.Remove(v);
         ctx.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Example #3
0
 public static bool AdicionarVaga(Vaga v)
 {
     try
     {
         ctx.Vagas.Add(v);
         ctx.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Example #4
0
 public static Vaga VerificarVagaPorId(Vaga v)
 {
     return(ctx.Vagas.FirstOrDefault(x => x.Id.Equals(v.Id)));
 }