Exemple #1
0
        public void Update(RevenueCategory revenueCategory)
        {
            var dbCat = _fukiziPfmContext.RevenueCategories.FirstOrDefault(ec => ec.Id == revenueCategory.Id);

            if (dbCat != null)
            {
                dbCat.Name = revenueCategory.Name;
            }
            _fukiziPfmContext.SaveChanges();
        }
Exemple #2
0
        public void Update(ExpenditureCategory expenditureCategory)
        {
            var dbCat = _fukiziPfmContext.ExpenditureCategories.FirstOrDefault(e => e.Id == expenditureCategory.Id);

            if (dbCat != null)
            {
                dbCat.Name = expenditureCategory.Name;
            }

            _fukiziPfmContext.SaveChanges();
        }
Exemple #3
0
 public void CreateExpenditure(Expenditure expenditure)
 {
     CleanUpForEF(expenditure);
     _fukiziPfmContext.Expenditures.Add(expenditure);
     _fukiziPfmContext.SaveChanges();
 }
Exemple #4
0
 public void CreateRevenue(Revenue revenue)
 {
     CleanUpForEF(revenue);
     _fukiziPfmContext.Revenues.Add(revenue);
     _fukiziPfmContext.SaveChanges();
 }