随笔分类 -  Entity Framework

摘要:publicclassDestination{publicintDestinationId{get;set;}publicstringName{get;set;}publicstringCountry{get;set;}publicstringDescription{get;set;}publicbyte[]Photo{get;set;}publicList<Lodging>Lodgings{get;set;}}publicclassLodging{publicintLodgingId{get;set;}publicstringName{get;set;}publicstringO 阅读全文
posted @ 2012-09-07 16:00 Master HaKu 阅读(210) 评论(0) 推荐(0) 编辑
摘要:- Data Annotations are attributes that you apply directly to theclass or properties that you want to affect. These can be found in the System.ComponentModel.DataAnnotations namespace.classAnimalType{publicintId{get;set;}[Required]publicstringTypeName{get;set;}}when it’s time to SaveChanges, Entity F 阅读全文
posted @ 2012-09-07 13:37 Master HaKu 阅读(318) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示