TAILIEUCHUNG - Pro Entity Framework 4.0 - Apress_8

câu hỏi là, tại sao bạn sẽ muốn có các tập tin giản đồ bên ngoài lắp ráp nhị phân? Câu trả lời thực sự sôi xuống đến mức độ thường xuyên thay đổi mô hình sau khi triển khai. Bằng cách tách các tập tin giản đồ từ lắp ráp nhị phân, bạn cung cấp một liên kết lỏng lẻo | CHAPTER 12 PERFORMANCE TUNING AND EXCEPTION HANDLING Looking at the metadata section of the connection string of the you will notice that the metadata section has changed as well. metadata . . . However you don t have to look at the file to see the metadata changes. Whenever you change the Metadata Artifact Processing property value and then save the EDM you can visually see the Connection String property Figure 12-10 change accordingly. You can also copy the schema files wherever you want and specify the location in the metadata by specifying the location of the files. metadata C AW C AW C AW So the question is why would you want to have the schema files outside of the binary assembly The answer really boils down to how often you change the model after deployment. By separating the schema files from the binary assembly you provide a loosely coupled scenario. For example nonbreaking schema changes could be made on the database such as adding a table which allow you to modify the SSDL and MSL to reflect these changes while the CSDL could be left alone. Be careful with this. If you move these and the Objectcontext cannot find them an exception will be thrown. Exception Handling Let s talk about handling Entity Framework specific exceptions. Obviously we are not going to discuss all of them because that would take a really long time and be completely boring. However we will talk about how to handle specific types of errors and the best way to approach your code to handle these exceptions. Some of what I cover is standard .NET error handling standards while the rest is particular to the Entity Framework. We ll begin by discussing some standard ways to trap and handle errors and then take a look at some specific EF exceptions and how the standard exception handling can help. If you have been developing applications for any length of time you know that exceptions

TỪ KHÓA LIÊN QUAN
Đã 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.