简体   繁体   English

如何在不使用EntityDataSource的情况下与Asp.Net一起使用EntityFramework?

[英]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#代码,并且我想遵循某种结构,

  1. Asp.Net WebSite(Front-end View and Process) Asp.Net WebSite(前端视图和过程)
  2. DataAccesslayer(Connection) DataAccesslayer(连接)
  3. BusinessLogicLayer(DB Process) BusinessLogicLayer(数据库流程)

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.

相关问题 如何在没有EntityFramework的情况下使用ASP.net Core 1“SignInManager” - How to use ASP.net Core 1 “SignInManager” without EntityFramework 如何在 ASP.NET 中跨实体请求保存状态而不使用 EntityFramework 保存到数据库? - How to save state across requests for an entity in ASP.NET without saving to database using EntityFramework? 使用EntityFramework在Asp.net Mvc中排序 - Sorting in Asp.net Mvc using entityframework asp.net中entitydatasource的GUID参数 - GUID parameter for entitydatasource in asp.net 在ASP.NET webforms中使用EntityDatasource进行过滤 - Filter with EntityDatasource in ASP.NET webforms ASP.NET EntityDataSource WHERE子句 - ASP.NET EntityDataSource WHERE Clause 不使用Microsoft.AspNet.Identity.EntityFramework的自定义Asp.net MVC 5身份验证 - Custom Asp.net mvc 5 authentication without using Microsoft.AspNet.Identity.EntityFramework 在更新事件期间,使用entitydatasource从表中获取旧值(C#ASP.NET) - Get Old Value from table using entitydatasource during updating event (C# ASP.NET) 如何使用entityframework从sql数据库中使用asp.net动态显示多个图像 - how to dynamically display multiple images using asp.net from sql database using entityframework 使用ASP.NET MVC和EntityFramework从DbContext中排除列 - Exclude a column from DbContext using ASP.NET MVC and EntityFramework
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM