public override void DeleteRecord(int id) { var context = new MoneyBoxEntities(); var obj = new tblMoneyBox_Records {Id = id}; context.AttachTo("tblMoneyBox_Records", obj); context.DeleteObject(obj); context.SaveChanges(); }
public override void UpdateCategory(Category category) { var context = new MoneyBoxEntities(); var obj = new tblMoneyBox_Categories {Id = category.Id}; context.AttachTo("tblMoneyBox_Categories", obj); category.CopyToObject(obj); context.SaveChanges(); }
public override void UpdateRecord(Record record) { var context = new MoneyBoxEntities(); var obj = new tblMoneyBox_Records {Id = record.Id}; context.AttachTo("tblMoneyBox_Records", obj); record.CopyToObject(obj); context.SaveChanges(); }