score:1
Better late than never:
If you have been using the Designer to create your LTS config and entities, you can right-click on the DBML file, and choose "Open With...". Now select XML Editor and click OK.
Find your Order_OrderDetail
association in this file, then add DeleteOnNull="true"
to it. Save the file and let LTS re-generate your classes for you. Done! No more having your changes to the generated code file overwritten again!
score:0
I'd build the assembly then use reflector to example the class to see if it has the attribute properties set from the partial class. If that don’t even work then you may need to try something else. That type of attribute overlap may not be supported.
What is it you're trying to achieve thru this?
score:1
Maybe you dont need the MetaData type. Will this work in your additional partial:
public partial class OrderDetail {
[Association(DeleteOnNull = true)]
public Order Order;
}
..i know that by itself Order
is not defined, but you shouldn't need to build like that. This MSDN doc suggests that the above should be possible (if i'm reading it correctly).
Source: stackoverflow.com
Related Articles
- LINQ - Entity framework code first - Grouped results to custom class
- Making a custom class availabe to LINQ queries
- LINQ Source Code Available
- How to perform group by in LINQ and get a Iqueryable or a Custom Class Object?
- LINQ to XML And Distinct Custom Class
- DeleteOnNull (Association attribute) for Linq to SQL in custom class?
- linq grouping by custom class
- C# - Linq cast generic list to custom class
- Sitecore7 Linq to Sitecore only works with SearchResultItem but not with Custom Mapped Class
- Convert xml to custom class using lambda linq
- C# How to Create a Custom (dynamic) class with Dynamic Linq using XElement in runtime
- creating Linq to sqlite dbml from DbLinq source code
- ASP.NET / LINQ / EF: Async on custom distinct comparer class
- How to order list in custom Item class with linq query
- Linq on Custom Class List
- Sequence contains no matching element - Return SiteMapNode matching custom attribute using LINQ
- Code practice to handle empty result set in Linq to custom list
- LINQ query can't select data into a custom class object
- source code for LINQ 101 samples
- LINQ custom class query with parameters select
- LINQ Anonymous Type to ObservableCollection in Custom Class
- Populate custom List sub class from XML document via LINQ
- In Silverlight, add custom property to a generated Linq class + manage events
- C# LINQ select property if it has a custom attribute
- LINQ to custom class when grouped by identifier
- How to access a property of a custom class using Linq to Object?
- Retrieve SiteMapNode matching custom attribute using LINQ
- Entity Framework LINQ Query using Custom C# Class Method - Once yes, once no - because executing on the client or in SQL?
- LINQ / XML - Storing child nodes which have different names in a custom class
- Using Linq to create a collection of a custom class from a DbSet that contains a list of grouped entities
- Uncommon elements in multiple lists
- How to programmatically determine tab index of fields on a form based on their X,Y coordinates?
- Filtering a list with linq
- Foreach item changes not preserved outside loop
- How to group inner list data based on a key in outer list in c# linq
- Recursive LINQ query: select item and all children with subchildren
- How to change the content of elements and attributes
- How to escape string for dynamic linq where clause
- How to get latest id only from database using LINQ in ASP.NET Core Web API?
- Duplicating Stored Users C# MVC Linq
- Why a simple linq command is not executed at the second case?
- LINQ: IF condition in WHERE clause not working
- How to restructure an Object in C# using LINQ?
- Use nested generics without a lot of code
- Entity Framework 6 deep copy/clone of an entity with dynamic depth
- Unable to process loop faster
- Linq Left Join where right is null
- Is it possible that filter IIS worker processes with more criteria?
- Combining LINQ queries in LINQ to CRM causes problems?
- How can I get a List<int> from LINQ to XML that produces List<List<int>>?