Non-generated property in LINQ to SQL behavior

Is it possible to make the LINQ to SQL constructor behavior editor recognize properties in table objects that were not created by the designer? That is, I want to pass a custom property (defined in my own partial class) as a parameter to the stored procedure.

I tried manually specifying the parameter name in XML (which does wonders for some other things, such as forcing SP types to return when the L2S designer cannot figure out that the return type matches an existing table). Unfortunately this does not work.

I am currently porting a set of web services written in .NET 1.1 to use everything that has come since. I am trying to consolidate all the behavior that was set by two objects of business objects (primarily changing the field name from the database to objects and type conversions) in LINQ objects.

The simplest solution in this case would be to simply change the parameter type for SP in the database, and I will do this in this case. However, the database already has three separate sets of SPs. Old web services. .NET 2.0 web services and website. I am trying to avoid the spread of SPS WCF web services, as I believe this will be very common given how much of the data access is done.

+3
source share
2

. 2010 , , . , connect.microsoft.com, .

, , /dbml. LINQ to SQL , , , , dbml.

+4

"", :

  • SP
  • ,
  • (yuck) * , !
0

Source: https://habr.com/ru/post/1713490/


All Articles