1234567891011121314151617181920212223242526272829303132 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace JLHHJSvr.LJLib.HttpServer
- {
- /// <summary>
- /// 开放给HTTP处理类读取数据库中文件的接口
- /// </summary>
- public interface IFileDBModel
- {
- byte[] GetBytes(string md5);
- }
- }
- // using (var con = new SqlConnection(MyGlobals.ConnString))
- // using (var cmd = con.CreateCommand())
- // {
- // con.Open();
- // cmd.CommandText = @"SELECT filedata
- // FROM fx_filemap
- // WHERE md5 = @filemd5 ";
- // cmd.Parameters.Clear();
- // cmd.Parameters.AddWithValue("@filemd5", filemd5);
- // using (var reader = cmd.ExecuteReader())
- // {
- // if (reader.Read())
- // {
- // body = reader["fileData"] == DBNull.Value ? null : (byte[])reader["fileData"];
- // }
- // }
- // }
|