Re: Extending SQL LINQ Table Class
- From: stcheng@xxxxxxxxxxxxxxxxxxxx (Steven Cheng[MSFT])
- Date: Tue, 08 Jan 2008 03:16:35 GMT
Thanks for your reply Mark,
Do you mean the "LINQ to SQL (Part 8 - Executing Custom SQL Expressions) "
link was broken? If so, you can try searching the subject in web directly.
There are a series of LINQ to SQL articles on ScottGu's blog. They are very
helpful.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: Mark Olbert <ChairmanMAO@xxxxxxxxxxxxxxxxx>long as you don't try to use them in a query.
Newsgroups: microsoft.public.dotnet.framework
Subject: Re: Extending SQL LINQ Table Class
Date: Mon, 07 Jan 2008 10:33:00 -0800
Steven,
Thanks for the quick reply. You're right, extended properties work fine so
don't map to database fields to method calls which can be used
I think I saw some references on the web to replacing properties that
in queries.Cheng[MSFT]) wrote:
BTW, the second link you gave me doesn't work.
- Mark
On Mon, 07 Jan 2008 09:11:13 GMT, stcheng@xxxxxxxxxxxxxxxxxxxx (Steven
in
Hi Mark,
I think custom properites with partial class for LINQ object class is
supported. As for the property you added, did you by any chance used it
forumany data query expression? It seems the custom property will not be
recognized in any query expression to the datasource. Or you just get the
compile error without using the property in any place? here is a web
tithread mentioned something about add custom property:
#Custom properties in LINQ to SQL classes
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1656614&SiteID=1
and here is a blog article about extending LINQ to SQL query:
#LINQ to SQL (Part 8 - Executing Custom SQL Expressions)
http://weblogs.asp.net/scottgu/archive/2007/08/27/linq-to-sql-part-8-execu
ifng-custom-sql-expressions.aspx
Hope this helps.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#not
issuesications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent
followwhere an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each
rights.up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
have
--------------------
From: Mark Olbert <ChairmanMAO@xxxxxxxxxxxxxxxxx>
Newsgroups: microsoft.public.dotnet.framework
Subject: Extending SQL LINQ Table Class
Date: Sun, 06 Jan 2008 17:37:00 -0800
designer for data contexts) with a property that has no
I am trying to extend a table entity class (generated from the visual
corresponding column in the underlying Sql Server table.property I added has no supported translation to the database.
When I do this, I get a NotSupportedException complaining that the
attribute will be ignored when interfacing to the
The documentation implies that properties not marked with the Column
database...but that's not what appears to be happening.
Is there some other attribute I need to decorate the property with to
the property "skipped"? Or is it just not possible to add
properties to table entity classes using partial classes? If that's thecase, the documentation should make that clear.
- Mark
.
- References:
- Extending SQL LINQ Table Class
- From: Mark Olbert
- RE: Extending SQL LINQ Table Class
- From: Steven Cheng[MSFT]
- Re: Extending SQL LINQ Table Class
- From: Mark Olbert
- Extending SQL LINQ Table Class
- Prev by Date: Re: mySqlBytes.buffer is getting converted to BigEndian even though both SQL server 2005 and the CLR function are on the same machine which shows BitConverter.IsLittleEndian == true
- Next by Date: Re: Downgrade from .Net 2.0 with sp1 to .Net 2.0 without sp1
- Previous by thread: Re: Extending SQL LINQ Table Class
- Next by thread: Re: Save As
- Index(es):
Relevant Pages
|