public bool AddExpense(TblExpenditure expense) { try { _context.Add(expense); _context.SaveChanges(); return(true); } catch (Exception Ex) { return(false); } }
public bool AddCategory(TblCategory category) { try { var isCateogryAdded = _context.Add(category); _context.SaveChanges(); if (isCateogryAdded.State.ToString().Equals("Added")) { return(true); } else { return(false); } } catch (Exception Ex) { return(false); } }