共12页: 上一页 1 2 3 4 5 6 7 8 9 下一页 末页 
摘要: The default Way to handle concurrency of Entity Framework is using optimistic concurrency . When two clinets update the same entity, one of theirs dat阅读全文
posted @ 2017-05-27 09:04 会长 阅读(69) 评论(0) 编辑
摘要: Joins allow developers to combine data from multiple tables into a sigle query. Let's have a look at codes: Creating a project 1. Create a project nam阅读全文
posted @ 2017-05-24 08:59 会长 阅读(40) 评论(0) 编辑
摘要: Complex types are classes that map to a subset of columns of a table.They don't contains key. They are the Value Objects . For example, you have a ent阅读全文
posted @ 2017-05-16 09:05 会长 阅读(77) 评论(2) 编辑
摘要: Sometimes, you need to find some data in an existing context instead of the database. By befault, Entity Framework always find data in database. If yo阅读全文
posted @ 2017-05-15 09:16 会长 阅读(46) 评论(2) 编辑
摘要: Creating Entities First of all, Let's create some entities to have a test. 1. Create a project 2. Add following packages by NuGet EntityFramework MySq阅读全文
posted @ 2017-05-14 18:40 会长 阅读(62) 评论(0) 编辑
摘要: There are three types of relationships in database. They are: One to Many One to One Many to Many The One to Many relationship Write some codes first:阅读全文
posted @ 2017-05-11 09:05 会长 阅读(62) 评论(4) 编辑
摘要: There are three ways to define the database structure by Entity Framework API. They are: Attributes The DbModelBuilder API Configuration Classes Attri阅读全文
posted @ 2017-05-09 09:07 会长 阅读(56) 评论(0) 编辑
摘要: Sometimes, you have created two models. They have the same parent class like this: public class Person { public int PersonId { get; set; } public stri阅读全文
posted @ 2017-05-05 09:18 会长 阅读(70) 评论(8) 编辑
摘要: Sometimes, you've created a table for example named Person . Just then, you want to add some extra information, but don't want to add any new field in阅读全文
posted @ 2017-05-04 08:45 会长 阅读(57) 评论(0) 编辑
摘要: Sometimes, We want to check the original sql statements. creating a commandInterceptor is a good way to do this. Add a class named MyCommandIntercepto阅读全文
posted @ 2017-05-01 22:33 会长 阅读(43) 评论(0) 编辑
共12页: 上一页 1 2 3 4 5 6 7 8 9 下一页 末页