score:2
i think that replacing mslinqtosqlgenerator
with something else is the cleanest solution and it might be done in several ways. you could, for example,
use a tool like t4 toolbox: linq to sql classes generator or reegenerator and modify the provided template to suit your needs. that's probably the easiest way.
generate the code with t4 using a custom template. you will need to create a t4 template which would use xml data from .dbml file. you'd probably need to disable dbml code generation by setting the custom tool property to blank. the disadvantage is you will need to run t4 generation each time after modifying .dbml file.
create a custom tool to generate the code for you using xml data from .dbml file and some templating solution (t4 or xslt, perhaps). this approach could arguably be the most flexible one, the only disadvantage is that you'll have to use the custom tool on every developers' machine.
i'm not sure what's optimal for your situation, but i'd probably consider using t4 toolbox first. the t4 template it uses is quite standard and can easily be modified if necessary.
Source: stackoverflow.com
Related Query
- Linq Mapping dbml - capturing stored proc parms for error reporting
- creating Linq to sqlite dbml from DbLinq source code
- LINQ entity data model generated code error - The type 'DBContexts.Category' already contains a definition for 'ID'
- source code for LINQ 101 samples
- Generated DBML code incorrectly marks returned columns as NOT NULL for stored procedures
- Create Reusable Linq To SQL For Stored Procedures
- Linq error - "NotSupportedException: Unsupported overload used for query operator 'Select'"
- Suggestions for designing complex LINQ code
- Paging Error :The method 'Skip' is only supported for sorted input in LINQ to Entities. The method 'OrderBy' must be called before the method 'Skip'
- LINQ "The return types for the following stored procedures could not be detected" (NOT temp tables)
- How to reuse a linq expression for 'Where' when using multiple source tables
- LINQ Source Code Available
- linq - how do you do a query for items in one query source that are not in another one?
- Entity Framework - Mapping doesn't map for stored procedure?
- Compilation error when i used lambda creator with base type for `Where` condition in linq
- Determine the source DataContext for a Linq to Sql query
- BestPractice: Pros and Cons for using AutoMapper or LINQ (LINQ to Objects) for mapping between a Domain Model and a Presentation Model
- Error When Querying For A Substring Using Dynamic Linq
- Stubbing Code for Test With Linq Expressions and Lambdas
- Calling stored proc with LINQ .ExecuteQuery to return non-mapped fields
- Same data being returned by linq for 2 different executions of a stored procedure?
- Dynamic "Not" by parameter in LINQ (Or any other code for that matter)
- Understanding the various options for runtime code generation in C# (Roslyn, CodeDom, Linq Expressions, ...?)
- Using LINQ query result for data source for GridControl c#
- How can I refactor this code for LINQ filtering?
- Linq or Stored proc - Which should I choose?
- Code Rewite for tuple and if else statements by using LINQ
- entity framework with linq query and stored expression error
- C# code for equivalent LINQ query
- Cannot build the Test project for LINQ IQueryable Toolkit (IQToolkit) - Code 9009
More Query from same tag
- Using LINQ query result for data source for GridControl c#
- Convert SQL select statement to Linq
- How does linq lambdas work inside a loop?
- Display results based on checkbox selection
- What is SQL equivalent to LINQ .All()
- Generating a list from csv to listbox
- Sorting list in c# with linq
- LINQ Expression for CROSS APPLY two levels deep
- Convert This Left-Join SQL to Method Syntax Linq
- How to Implement GetEnumerator method for class that implements IEnumerable<IEnumerable<T>>
- How can i make this code more optimized - How can i replace the forloop.?
- How to get last 2 words (starting from the second-to-last space) from string?
- In MVC how can I return a IQueryable result and display it in a view using actions
- Check if a string has at least one number in it using LINQ
- IList<Object> to XML via a ForEach
- Building a LINQ query based on a JSON array
- Getting error:The entity or complex type cannot be constructed in a LINQ to Entities query
- return type for displaying the duplicates
- System.Linq.Dynamic using ?? c# operador
- LINQ - Merge list elements retaining order (functional thinking)
- Linq filter using List<int>
- Deleting selected relations in many-to-many relationship in EF?
- How to select a single object using Linq in vb.net
- VB.NET: LINQ Query on DataTable - WHERE Id >=0
- Can I make TextBlock clickable - Based on XML parsing results?
- IGrouping several groups to View
- Breaking up a list into a set of indexed lists
- What are the major differences between Data Access Application Block, NHibernate, ADO.NET Entity Framework and LINQ to SQL?
- LINQ for an SQL with multiple LEFT OUTER JOINS on different tables
- Order by fields in an anonymous type