public void Edit(Category category) { if (category != null) { db.Entry(category).State = EntityState.Modified; } }
public void Add(int accountId, Category category) { var account = db.Accounts.Find(accountId); if (account != null) { if (category != null) { account.Categories.Add(category); } } }
public void Edit(Category category) { repository.Edit(category); }
public void Add(int accountId, Category category) { repository.Add(accountId, category); }