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