public void Update(RevenueCategory revenueCategory) { var dbCat = _fukiziPfmContext.RevenueCategories.FirstOrDefault(ec => ec.Id == revenueCategory.Id); if (dbCat != null) { dbCat.Name = revenueCategory.Name; } _fukiziPfmContext.SaveChanges(); }
public void Update(ExpenditureCategory expenditureCategory) { var dbCat = _fukiziPfmContext.ExpenditureCategories.FirstOrDefault(e => e.Id == expenditureCategory.Id); if (dbCat != null) { dbCat.Name = expenditureCategory.Name; } _fukiziPfmContext.SaveChanges(); }
public void CreateExpenditure(Expenditure expenditure) { CleanUpForEF(expenditure); _fukiziPfmContext.Expenditures.Add(expenditure); _fukiziPfmContext.SaveChanges(); }
public void CreateRevenue(Revenue revenue) { CleanUpForEF(revenue); _fukiziPfmContext.Revenues.Add(revenue); _fukiziPfmContext.SaveChanges(); }