应该为 CRUD 应用程序创建什么类型的事件?
我有一个以数据库(ORM 是 LINQ-SQL)为中心的应用程序,该数据库有一个名为“Assignment”的表。我正在使用存储库模式来操作数据库。我的应用程序基本上将执行 CRUD 操作。我是委托和事件的新手,我问您应该创建哪些事件(例如AssignmentCreating、AssignmentCreated)以及使用哪种委托(例如可能是自定义委托或只是EventHandler)? 更新:我的应用程序有一个ListView,其中一些列显示一些数据。在右侧,我有一个面板,其中的文本框绑定到当前所选分配的值。就像分数文本框、标题文本框等等,它们都是可编辑的。它涉及读取和更新。然后我有一个具有相同类型文本框的自定义对话框,并且该对话框创建新分配。然后,用户只需选择一个作业并通过“删除”按钮或上下文菜单删除即可。
I have an application that is centered around a database (ORM is LINQ-SQL) that has a table called Assignment. I am using the repository pattern to manipulate the database. My application is basically going to perform CRUD operations. I am new to delegates and events and I am asking you what events I should create (like maybe AssignmentCreating, AssignmentCreated) and what kind of delegate to use (like maybe a custom delegate or just an EventHandler)? UPDATE: My application has a ListView with some columns that show some data. On the right side, I have a panel with textboxes binded to the values of the currently selected assignment. Like a textbox for Score, one for title, etc. and they are all editable. That deals with the Read and Update. Then I have a custom dialog box that has the same kinds of textboxes, and the dialog Creates new assignments. Then users can just select an assignment and Delete it via the Delete button, or a context menu.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论