Get Files in app windows c# with WCF RRS feed

  • Question

  • Hello people, 

    how to get files save in database sql server and show in application store. I use WCF to get data. The code is that:

     public List<Anexos> getAnexos()
                //connection string
                if (DBconnection.State == ConnectionState.Closed)
                List<Anexos> anexo = new List<Anexos>();
                SqlCommand command = new SqlCommand("select * from Anexos", DBconnection);
                SqlDataReader reader = command.ExecuteReader();
                while (reader.Read())
                    anexo.Add(new Anexos()
                        ID_Anexo = Convert.ToInt32(reader["ID_Anexo"].ToString()),
                        Nome = reader["Nome"].ToString(),
                        Anexo = reader["Anexo"],
                        Tipo = reader["Tipo"].ToString(),
                        Data = Convert.ToDateTime(reader["Data"].ToString()),
                        ProjFinalID_Projeto = Convert.ToInt32(reader["ProjFinalID_Projeto"].ToString())
                        //Versao = reader["Versao"].ToString()
                return anexo;

    I return anexos. I can get data but not the file, how i do?


    Friday, November 15, 2013 3:58 PM


All replies