Example #1
0
        public static void AddConta(Conta newContas)
        {
            LabComrpasBdContext context = new LabComrpasBdContext();

            context.Contas.Add(newContas);
            context.SaveChanges();
        }
Example #2
0
        public static void novaDespesa(Despesa novaDespesa)
        {
            LabComrpasBdContext context = new LabComrpasBdContext();

            context.Despesas.Add(novaDespesa);
            context.SaveChanges();
        }
Example #3
0
        public static void ClearContas()
        {
            LabComrpasBdContext context = new LabComrpasBdContext();

            foreach (Conta c in Contas)
            {
                context.Contas.Remove(c);
            }

            context.SaveChanges();
        }
Example #4
0
        public static void ClearDespesa()
        {
            LabComrpasBdContext context = new LabComrpasBdContext();

            foreach (Despesa d in Despesa)
            {
                context.Despesas.Remove(d);
            }

            context.SaveChanges();
        }