[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

custom site column not showing in LINQ Intellisence

Posted on 2011-03-07
3
Medium Priority
?
720 Views
Last Modified: 2012-05-11
Hi,
I have a custom content type which is not showing up in LINQ Intellisence.

I already ran the SPmetal.exe to create the MyEntitiesDataContext Class. The list is though showing up in the LINQ intellisence.
However, the list is associated with the custom content type. And, the custom column is not showing up in LINQ Intellisence.
How can i bring in the custom column in LINQ Intellisence.
0
Comment
Question by:me24hour
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
3 Comments
 

Author Comment

by:me24hour
ID: 35063012
Here are more details I would like to provide

            using (MyEntitiesDataContext sq = new MyEntitiesDataContext(currentSPsite.Url))
            {
                //Using LINQ to work with DataContext Object to fetch LSO Num from SequentialIDs list
                //EntityList<SeqlID> sequentialIDs = sq.GetList<SeqlID>("SequenceIDs");

                var q = from unique_Id in sq.SequentialIDs
                        where unique_Id.Title.StartsWith("LSO")
                        select new
                        {
                            unique_Id.Id,
                            unique_Id.Title,
                        };

                foreach (var a in q)
                {
                    iLsoNum = Convert.ToInt32(a.Id);
                    iLsoNum = iLsoNum + 1 ;                    
                }
            }        


In the above code the list 'SequentialIDs' has a custom column unique_Id. However, the intellisence is not picking up that column.

thanks in advance for any given help...!!
0
 

Accepted Solution

by:
me24hour earned 0 total points
ID: 35071512
Hi Guys,
After struggling for a day, I finally found the solution.
Actually, in my case, SPMetail.exe was not recognizing the custom content type.
It was associating the list with the parent content type which in my case was item.

To resolve the issue I changed the contenty type for the custom list in the entitydatacontext.cs file.
            [Microsoft.SharePoint.Linq.ListAttribute(Name="SequentialIDs")]
        public Microsoft.SharePoint.Linq.EntityList<Ct_Unique_Id> SequentialIDs
        {
                  get {
                return this.GetList<Ct_Unique_Id>("SequentialIDs");
                  }
            }

The following blog was helpful:
http://rgielen.blogspot.com/2010/10/spmetal-linq-to-sharepoint-2010.html
0
 

Author Closing Comment

by:me24hour
ID: 35071516
Thanks
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question