哪种 .net 数据技术最适合在此项目中通过 XML 启用用户定义字段
我是 ASP.NET / .net 的新手,我已经为一个业余项目 webapp 设计了屏幕和数据库结构,并准备开始编码。我需要用户定义的字段,在对选项的优缺点进行深思熟虑后,我决定将它们实现为 XML blob。
我正在寻找数据访问的 3 个选项:
1)实体框架:我还没有找到关于如何使用 EF 进行此操作的信息
2)动态数据:我可以创建生成标签/文本框对的自定义字段模板,但它将位于一个列标题,如果我在(例如 gridview)中查看它
3)自己编码 DAL / BLL,仅使用 sql 连接。希望 ObjectDataSources 能够在 UI 中提供足够的灵活性。 (我会在这里分割 BLL 中的字段,我接受它吗?)
我想坚持使用 MS 技术,而不是 NHibernate 等,所以这将有助于学习 MCTS 证书(也是为什么我不使用 MVC,因为我需要最终都知道)。我也认为使用解决方案号可能是错误的。 3 就雇主想要的东西而言,我将获得最不相关的经验。你们认为对于我的新手技能水平来说,什么是一个好的解决方案?
编辑
一旦我开始实施,我决定不使用 xml blob,而是选择备用字段和元表。
I am new to ASP.NET / .net, i have designed the screens and database structure for a side project webapp and ready to start coding it. I needed user defined fields and after much deliberation over the pros and cons of the options i decided to implement them as an XML blob.
Im looking at 3 options for data access:
1) Entity Framework: i havnt found an in on how id go about this with EF
2) Dynamic Data: i could create custom field template that produces label / textbox pairs, but it would be under one column header if i viewed it in a (eg gridview)
3) Coding a DAL / BLL myself, using just sql connections. ObjectDataSources would give enough flexibility in the UI hopefully. (I would split the fields in the BLL here i take it?)
I want to stick with MS tech, rather than NHibernate or such, so this will help with learning for the MCTS cert (also why im not using MVC as i need to know both eventually for it). I also, perhaps wrongly, think in using solution no. 3 i would be gaining the least relevant experience in terms of what employers would want. What do you guys think is a good solution for my newbie skill level here?
Edit
Once i got into the implementation I decided against using xml blobs, opting instead for spare fields and a meta table.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的目标是获得雇主想要的宝贵技能,我肯定会自己编写 DAL/BLL。
WCF 数据服务具有 BLOB 支持。 MSDN 中的这个示例使用了 EF,但可能是一个好的开始。
另请查看 ADO.NET< 上的 MSDN 部分/a>
If your goal is to gain a valuable skill employers would want I would definitely code the DAL / BLL yourself.
The WCF Data Services has BLOB support. This example from MSDN uses EF but might be a good start.
Also check out this MSDN section on ADO.NET