what is Entity Framework with POCO

后端 未结 4 1020
Happy的楠姐
Happy的楠姐 2020-12-13 02:25

What is the benefit of using POCO? I don\'t understand the meaning of Persistence Ignorance, what does this mean? That the poco object can\'t expose things like Save? I can\

4条回答
  •  清歌不尽
    2020-12-13 03:12

    POCO = Plain old CLR Objects

    POCO Benefits:

    Technology Agnosticism is a bliss: This concept is usually revolving around PI (Persistence Ignorance), but it is not only that. Persistence Ignorance means that your entities should be cleared of any persistence related code constraints that a framework - usually an ORM - forces on you. This is, for e.g. if you have attribute level mapping where those attributes are not part of your domain but are there just because some framework wants them to be there, then your domain is not persistence ignorant. Sidar said here

提交回复
热议问题