/// <summary> /// Create a new Ecommerce_Produto_Anexo object. /// </summary> /// <param name="idProdutoAnexo">Initial value of the IdProdutoAnexo property.</param> /// <param name="idProduto">Initial value of the IdProduto property.</param> /// <param name="idTipoAnexo">Initial value of the IdTipoAnexo property.</param> /// <param name="caminhoAnexo">Initial value of the CaminhoAnexo property.</param> /// <param name="ordem">Initial value of the Ordem property.</param> /// <param name="dataInclusao">Initial value of the DataInclusao property.</param> /// <param name="isAtivo">Initial value of the IsAtivo property.</param> public static Ecommerce_Produto_Anexo CreateEcommerce_Produto_Anexo(global::System.Int32 idProdutoAnexo, global::System.Int32 idProduto, global::System.Int32 idTipoAnexo, global::System.String caminhoAnexo, global::System.Int32 ordem, global::System.DateTime dataInclusao, global::System.Boolean isAtivo) { Ecommerce_Produto_Anexo ecommerce_Produto_Anexo = new Ecommerce_Produto_Anexo(); ecommerce_Produto_Anexo.IdProdutoAnexo = idProdutoAnexo; ecommerce_Produto_Anexo.IdProduto = idProduto; ecommerce_Produto_Anexo.IdTipoAnexo = idTipoAnexo; ecommerce_Produto_Anexo.CaminhoAnexo = caminhoAnexo; ecommerce_Produto_Anexo.Ordem = ordem; ecommerce_Produto_Anexo.DataInclusao = dataInclusao; ecommerce_Produto_Anexo.IsAtivo = isAtivo; return ecommerce_Produto_Anexo; }
/// <summary> /// Deprecated Method for adding a new object to the Ecommerce_Produto_Anexo EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToEcommerce_Produto_Anexo(Ecommerce_Produto_Anexo ecommerce_Produto_Anexo) { base.AddObject("Ecommerce_Produto_Anexo", ecommerce_Produto_Anexo); }
/// <summary> /// Creates the attachment. /// </summary> /// <param name="fileName">Name of the file.</param> /// <returns></returns> private static Ecommerce_Produto_Anexo CreateAttachment(String fileName) { var productAttach = new Ecommerce_Produto_Anexo { IdTipoAnexo = ((Int32)TipoProdutoAnexo.Imagem), IsAtivo = true, DataInclusao = DateTime.Now, CaminhoAnexo = fileName }; return productAttach; }