private void detach_Disabilities(Disability entity) { this.SendPropertyChanging(); entity.Account = null; }
partial void DeleteDisability(Disability instance);
partial void InsertDisability(Disability instance);
partial void UpdateDisability(Disability instance);
public bool presist(DisabilityDTO entity) { try { model.Disability obj = new Disability(); obj.userName = entity.userName; obj.disabilityType = entity.disabilityType; obj.description = entity.description; ctx.Disabilities.InsertOnSubmit(obj); ctx.SubmitChanges(); return true; } catch (Exception) { ctx.Dispose(); ctx = new ModelDataContext(); return false; } }