public void Save(Data.Fund entity) { try { if (entity.ID == Guid.Empty) { entity.ID = Guid.NewGuid(); entity.LastEdit = DateTime.Now; this.Table.Add(entity); } else { var view = this.GetViewById(entity.ID); if (view.FBankNO != entity.FBankNO) { entity.LastEdit = DateTime.Now; } } this.SubmitChanges(); } catch { throw; } }
public void Delete(Data.Fund entity) { try { if (entity == null) { return; } this.Table.Remove(entity); this.SubmitChanges(); } catch { throw; } }