如何在Wpf中从实体框架生成Crud操作? [英] How Can I Generate Crud Operations From Entity Framework In Wpf?

查看:103
本文介绍了如何在Wpf中从实体框架生成Crud操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于mvc中有脚手架,它可以从实体框架自动生成crud操作。我只想重复我的工作,但这次是WPF。如何在wpf中为我的实体框架获取这些自动生成的crud操作....

解决方案

实体框架是一个单独的框架,没有连接或依赖在ASP.NET MVC或WPF上。您可以在两者中使用它们,它们的数据绑定和其他技术也不同,您可能希望从头开始概念化它们。



这里提供了你要做的全部流程: https://msdn.microsoft.com/en-us/data/jj574514.aspx?f=255&MSPPError=-2147217396 [ ^ ]。它不仅教你如何入门,而且该示例还向您展示了如何构建整个应用程序,从将Entity框架添加到项目一直到将数据绑定到Entity框架。



就这些CRUD操作而言,实体框架不会创建它们。 Visual Studio有。您选择使用实体框架CRUD创建新的MVC控制器(类似的东西),该选项为您生成CRUD函数。 实体框架仅在数据源和应用程序之间映射您的数据。

As there is scaffolding in mvc which generates crud operations automatically from entity framework. I just want to repeat my work but this time for WPF. How can i get these automatically generated crud operations for my entity framework in wpf....

解决方案

Entity framework is a separate framework and is not connected to, or dependant on either ASP.NET MVC or WPF. You can use it in both, their data binding and other techniques are also different you may want to conceptualize them from beginning.

Entire flow of what you have to do is provided here: https://msdn.microsoft.com/en-us/data/jj574514.aspx?f=255&MSPPError=-2147217396[^]. It doesn't only teach you how to get started, but the example also shows you how to build an entire application, beginning from adding Entity framework to your project all the way to binding the data to Entity framework.

As far as those CRUD operations are concerned, Entity framework doesn't create them. Visual Studio does. You select to "Create a new MVC Controller with Entity Framework CRUD" (something like that), that option generates CRUD functions for you. Entity framework only maps your data in between the data source and the application.


这篇关于如何在Wpf中从实体框架生成Crud操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆