如何在复杂的 simpleDb 实体上实现 CRUD
我有一个复杂的对象:
ItemName (single only)
Client (single only)
Provider (single only)
Attribute1 (multiple allowed)
Attribute2 (multiple allowed)
Attribute... (multiple allowed)
我有一个 C# 对象:
public class MyJobModel
{
public Dictionary<string,List<string>> JobAttributes { get; set; }
public string ItemName { get; set; }
public string Client { get; set; }
public string DataProvider { get; set; }
public string DataProviderSpecificId { get; set; }
public MyJobModel()
{
JobAttributes = new Dictionary<string, List<string>>();
}
}
我有一个存储库,我可以通过查询查询和填充单个或多个。
我不认为我会在创建时遇到问题,但由于同名的多个允许属性的性质,我确实遇到了编辑问题。
有什么建议吗?
I have a complex object:
ItemName (single only)
Client (single only)
Provider (single only)
Attribute1 (multiple allowed)
Attribute2 (multiple allowed)
Attribute... (multiple allowed)
I have an object in C#:
public class MyJobModel
{
public Dictionary<string,List<string>> JobAttributes { get; set; }
public string ItemName { get; set; }
public string Client { get; set; }
public string DataProvider { get; set; }
public string DataProviderSpecificId { get; set; }
public MyJobModel()
{
JobAttributes = new Dictionary<string, List<string>>();
}
}
I have a repository and I can query and fill single or multiple by query.
I don't think I'm going to have an issue creating but I do have an issue editing because of the nature of multiple allowed attributes of the same name.
Any suggestion on what to do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议看看 Codeplex 上 Ashley Tate 优秀的“Simol”(以前的“Simple Savant”)库:
http:// simol.codeplex.com/
I would suggest taking a look at Ashley Tate's excellent "Simol" (formerly "Simple Savant") library on Codeplex:
http://simol.codeplex.com/