Exemplo n.º 1
0
    public bool presist(SupportDocDTO entity)
    {
        try
        {
             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;
		}