实体框架、动态数据和版本控制
我正在寻找后台工具的选项。 从表面上看,该工具是简单的 CRUD,因此我立即被实体框架之上的动态数据所吸引(我们绝对是微软商店!)。
问题是未来的要求是支持版本控制。 我的意思是:
- 用户对一系列实体执行一系列更新
- 当他们高兴时,他们会提交更改 更改
- 会连同足够的信息一起保存到数据库中以支持回滚
在其他地方,我们有手工制作的应用程序:
- 包括版本 ID随着插入的每个新行而递增 - 即我们不更新我们添加新行
- 工作项表使用版本 ID 和实体类型(表)将更改联系在一起
所以,问题是,我将如何实现使用实体框架和动态数据得到类似的最终结果?
如果实体框架等不合适 - 你会使用什么(.Net)?
谢谢, 艾伦
I'm in the process of looking around at options for a back office tool. On the face of it the tool is simple CRUD so I was immediately attracted to Dynamic Data on top of Entity Framework (we're definitely a Microsoft shop!).
The problem is that future requirement is to support versioning. By this I mean :
- User performs a series of updates to a series of entities
- When they are happy they submit the changes
- Changes persisted to the DB along with enough info to support a rollback
Elsewhere we've got handcrafted app that :
- Includes a version id that is incremented as each new row inserted - i.e. we don't update we add a new row
- A work item table ties together the changes using the version id along with the entity type (table)
So, the question is, how would I achieve a similar end result using entity framework and dynamic data?
If entity framework, etc isn't appropriate - what would you use (.Net)?
Thanks,
Alan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一种解决方案是将版本控制逻辑移至数据库触发器。 这样,您就可以在实体框架之上使用标准动态数据,并通过运行一组数据库脚本来改进版本控制。
One solution would be to move the logic for the versioning to database triggers. This way you are able to use a standard Dynamic data on top of Entity Framework, and retrofit versioning by running a set of database scripts.
我想提一下,在新的 Dyanmic Data Preview 3 中,有一个新功能 DomainService,它支持基于角色的安全性,请参阅来自 MIX09 的 David Ebbo 的 Serssion Microsoft ASP.NET 4.0 数据访问:Web 表单 MIX09-T47F 的成功模式
I would like to mention that in the new Dyanmic Data Preview 3 there is a new feature DomainService which supports Roles based security please see David Ebbo's Serssion from MIX09 here Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms MIX09-T47F