[英]How can i get image data from sql DataBase
I saved my file in the database, I want to get that file for sending mail If I wrote where the condition 我将文件保存在数据库中,我想获取该文件用于发送邮件。
public EMS_PROFILE_UPLOAD_MASTER GetHrUploadeProfile(string EnqId)
{
var x = from n in db.EMS_PROFILE_UPLOAD_MASTER
where n.ENQUIRY_CODE== EnqId
select n;
foreach(var fileData in x)
{
var _FilData = fileData.FILEDATA;
}
return x.FirstOrDefault();
}
I'm getting data but here I have multiple files in my database, how can I differentiate that file? 我正在获取数据,但是这里我的数据库中有多个文件,如何区分该文件?
The fact that you have multiple files with the same ID - means you cannot use the ID as the selector. 您有多个具有相同ID的文件-这意味着您不能将ID用作选择器。 Inside your code example, it seems that there may be other meta-data from that fileData object - what is inside that to further filter or control your selection for the correct file?
在您的代码示例中,似乎该fileData对象中可能还有其他元数据-该文件中有什么进一步过滤或控制您对正确文件的选择?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.