[英]How to Use EntityFramework with Asp.Net without using EntityDataSource?
I need to use EntityFramework with Asp.Net. 我需要在Asp.Net中使用EntityFramework。
I've read the Tutorials given by Microsoft in here 我在这里阅读了Microsoft提供的教程
In that tutorial I learned to use the EF with EntityDataSource. 在该教程中,我学习了将EF与EntityDataSource一起使用。 But I want to do DB those operations without using EntityDataSource instead I want to use c# code and I would like to follow some structure like,
但是我想在不使用EntityDataSource的情况下进行DB这些操作,而我想使用c#代码,并且我想遵循某种结构,
I wish to create and use The models on my own, I don't want to just refer the datasource to the Gridview and it displays, I want to write codebehind operation with c#. 我希望自己创建和使用模型,我不想仅将数据源引用到Gridview并显示它,我想使用c#编写代码隐藏操作。 .
。 .
。
Somebody tell me where could I find examples for that or if anybody knows that means please answer me with little explanation(since I'm a beginner) 有人告诉我在哪里可以找到示例,或者有人知道这意味着请给我小的解释(因为我是初学者)
You can directly assign entity framework objects as data source. 您可以直接将实体框架对象分配为数据源。 Look at this article in msdn
看看msdn中的这篇文章
-- edit -- -编辑-
Here is the more appropriate reference for you: http://www.codeproject.com/Articles/43367/ADO-NET-Entity-Framework-as-Data-Access-Layer 这是更适合您的参考: http : //www.codeproject.com/Articles/43367/ADO-NET-Entity-Framework-as-Data-Access-Layer
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.