public static void AddConta(Conta newContas) { LabComrpasBdContext context = new LabComrpasBdContext(); context.Contas.Add(newContas); context.SaveChanges(); }
public static void novaDespesa(Despesa novaDespesa) { LabComrpasBdContext context = new LabComrpasBdContext(); context.Despesas.Add(novaDespesa); context.SaveChanges(); }
public static void ClearContas() { LabComrpasBdContext context = new LabComrpasBdContext(); foreach (Conta c in Contas) { context.Contas.Remove(c); } context.SaveChanges(); }
public static void ClearDespesa() { LabComrpasBdContext context = new LabComrpasBdContext(); foreach (Despesa d in Despesa) { context.Despesas.Remove(d); } context.SaveChanges(); }