开发者

How do you implement CRUD on a complex simpleDb entity

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; }
        publ开发者_如何学Pythonic 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?


I would suggest taking a look at Ashley Tate's excellent "Simol" (formerly "Simple Savant") library on Codeplex:

http://simol.codeplex.com/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜