从edmx检索记录 [英] Retrieve a record from edmx
本文介绍了从edmx检索记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hii朋友..
我有3层架构项目,使用asp.net中的实体框架.
在这里,我想在我的三层体系结构中使用edmx文件从表中检索一条记录..
hii friends..
I have 3 tier architecture project using entity frame work in asp.net.
here i want to retrieve a single record from table using edmx file in my three tier architecture ..
推荐答案
实体模型的第一个make对象
first make object of Entity Model
DatabaseEntities dbe = new DatabaseEntities();
对于任何特定记录,请尝试使用此查询..
Try this query for any particular record..
var selectRecord = (from item in dbe.TableName
where item.id == [matching prameter]
select item).SigleOrDefault();
在DAL(数据访问层)中添加此代码节.
Add this Section of Codes in DAL(Data Access Layer).
这篇关于从edmx检索记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文