public bool presist(SupportDocDTO entity) { try { model.supportDoc obj = new supportDoc(); obj.userName = entity.userName; obj.title = entity.title; obj.description = entity.description; obj.content = new System.Data.Linq.Binary(entity.content);//Array of bytes to Linq.Binary ctx.supportDocs.InsertOnSubmit(obj); ctx.SubmitChanges(); return true; } catch (Exception) { ctx.Dispose(); ctx = new ModelDataContext(); return false; } }
partial void DeletesupportDoc(supportDoc instance);
partial void InsertsupportDoc(supportDoc instance);
partial void UpdatesupportDoc(supportDoc instance);
private void detach_supportDocs(supportDoc entity) { this.SendPropertyChanging(); entity.Account = null; }