Exemple #1
0
        public MonthlyIncome Save(MonthlyIncome monthlyIncome)
        {
            if (monthlyIncome.IncomeID == 0)
            {
                db.MonthlyIncomes.Add(monthlyIncome);
            }
            else
            {
                db.Entry(monthlyIncome).State = System.Data.Entity.EntityState.Modified;
            }

            db.SaveChanges();
            return(monthlyIncome);
        }
Exemple #2
0
 public void Delete(MonthlyIncome monthlyIncome)
 {
     db.MonthlyIncomes.Remove(monthlyIncome);
     db.SaveChanges();
 }