使用LINQtoSQL设计MS_Access表的用户界面 [英] Using LINQtoSQL to design user interface for MS_Access table

查看:126
本文介绍了使用LINQtoSQL设计MS_Access表的用户界面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设计了WPF详细信息表单(XAML部分).
我也有一个MS_Access数据库,其中设计了用于测试的虚拟记录.
使用LINQtoSQL,我需要:
(1)将键值列表检索到菜单中(使用WPF)
(2)在WPF详细信息表单中显示所选记录
(3)如果表键不存在,则允许通过明细表将记录输入数据库.
我在MS_Access方面拥有丰富的经验,但是使用WPF进行界面设计对我来说是新的.
如何在xaml和C#代码背后编码LINQ,以使其工作?
我也是实现C#的初学者.
我需要IEnumerable吗?或因此我需要以某种方式调用"数据库,即使它已经包含在Visual Studio的项目中.
谢谢!

I have designed a WPF detail form (the XAML portion).
I also have an MS_Access database designed with dummy records for testing.
Using LINQtoSQL, I need to:
(1) Retrieve a list of key values into a menu(using WPF)
(2) Display the selected record within the WPF detail form
(3) Allow input of records to the database via the detail form if the table key does not exist.
I have plenty of experience with MS_Access, but the interface design using WPF is new to me.
How do I code the LINQ within the xaml and C# code-behind to make this work?
I''m a beginner at implementing C# also.
Is the IEnumerable all I need? or so I need to "call" the database somehow, even though it is already included in the project within Visual Studio.
Thanks!

推荐答案

您的问题让我有些困惑,尤其是主题行.

LINQ与用户界面几乎没有关系.

基本上,您将使用LINQ返回IEnumerable<>.在WPF应用程序中绑定到的集合(Xaml或后面的代码).
I am a little confused by your question, especially the subject line.

LINQ has little or nothing to do with the user interface.

Basically you would use LINQ to return an IEnumerable<> collection which you bind to in the WPF app, either Xaml or code behind.


我也是实现C#的初学者.
我需要IEnumerable吗?或者,即使它已经包含在Visual Studio的项目中,我也需要调用"该数据库.
I''m a beginner at implementing C# also.
Is the IEnumerable all I need? or so I need to "call" the database, even though it is already included in the project within Visual Studio.


这篇关于使用LINQtoSQL设计MS_Access表的用户界面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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