TAILIEUCHUNG - [FSC]Apress Pro Entity Framework 4.0_6

Figure 7-6. Entities defined in EF Many of the changes that Microsoft made were to the EDM. You can see in Figure 7-7 that the properties page for the association has been modified. The information in the properties page isn’t that different from EF , but you can see some property naming differences as well as a few additions. You now have End1 and End2 differentiation, and you still have the Multiplicity and Role for each end. New to EF on this page is the OnDelete property for each end, which specifies the action to be taken when. | CHAPTER 7 RELATIONSHIPS AND ASSOCIATIONS Contact s Properties ContactID 2Ế NameStyle ấ Title 2 FirstName 2 MiddleName 2S LastName 2 Suffix Employee Properties EmployeelD 2 NationallDNum. 2 ContactID 2 LoginlD 2Ề ManagerlD Title 25 BirthDate 2 MaritalStatus 2 Gender 2 Email Address 2 j EmailPromotion 2 5 Phone 2 PasswordHash 23 PasswordSalt 2 AdditionalConta. 23 rowguid 1 2 r Hire Date 25 SalariedFlag 2fj VacationHours 2 Sic kLeaveH ours 2 CurrentFlag 2 rowguid 2Ĩ ModifiedDate 23 Modified Date s Navigation Properties B Navigation Properties Employees Contact Employeel Employee ị 01 I Figure 7-6. Entities defined in EF Many of the changes that Microsoft made were to the EDM. You can see in Figure 7-7 that the properties page for the association has been modified. The information in the properties page isn t that different from EF but you can see some property naming differences as well as a few additions. You now have End1 and End2 differentiation and you still have the Multiplicity and Role for each end. New to EF on this page is the OnDelete property for each end which specifies the action to be taken when an entity on this specified end is deleted. Your options for the OnDelete property are None and Cascade. Figure 7-7. association properties 115 CHAPTER 7 RELATIONSHIPS AND ASSOCIAATIONS Microsoft also added a couple of new visual items to the UI to help define and manage relationships between entities. These items and features are discussed in the following sections. Defining Referential Constraints Back in the EDM Designer double-click the association between the two entities. In EF a new Referential Constraint dialog opens showing the foreign key properties for the relationship see Figure 7-8 . Figure 7-8. Referential Contstraint Dialog The Referential Constraint dialog allows you to define the foreign key FK constraint between the source entity and the target entity. How do you know which is the target and which is the source If it isn t

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.