-
Hi there, I have a LINQ to SQL file. I've dragged all my tables on and it all worked. I then modified a table (tblComment), removed it from my LINQ to SQL file and readded it. Now when I try to compile my project I receive this error: Error 2 'linqdatabaseDataContext' does not contain a definition...
-
Hi I'm having a trouble with this linq query: Dim data = From p In db.Table1_ From d In p.Table2.DefaultIfEmpty() _ Select Code = p.Code, _ Descr = p.Descr, _ LevelCode = p.LevelCode, _ Table1ID = p.Table1ID , _ Prc = d.Prc, _ SymbolCurrencies = d.Table3s.SymbolCurrencies _ Order By Code While I'm...
-
Hi. I have a sql compact 3.5 database with shema which was illustrated her e. As you can see from the picture i have 3 relations "one-to-many" and table "Zvon_users" join twice in table "Zvon_tasks". 3 foreign keys in table "Zvon_tasks" was placed at NavigationProperties...
-
Hello, I have 2 tables I need help adding content to. The two tables are Field and Field_Answers FIELD Id Form_id Question_id Field_name Question FIELD_ANSWERS Id Form_id Forms_submitted_id Question_id Value The FORM_ID is the form that these 2 tables are tied
to. Each Form has 1 FIELD table
associated...
-
Cast your resluts to a list. You can then sort the list using Linq or soemthing like that. I have a code snippet below that shows how to return your results in the form of an IEnumerable collection. You can then use the standard LINQ sorting methods. hth private static IEnumerable<UserPrincipal>...
-
I have 2 custom classes: Theme.vb and ThemeManager.vb. Theme.vb looks like: 1 Public Class Theme 2 Private m_domain As String = String .Empty 3 Private m_name As String = String .Empty 4 5 Public Property Domain() As String 6 Get 7 Return m_domain 8 End Get 9 Set ( ByVal value As String ) 10 m_domain...
-
Hello All, I have linq query that takes 2 list(arrays - ColIds and Colvals) and an Integer Value (InstitutionID). I am using CONTAINS to match the values in the Lists. I want the results to be distict. The Distinct at the end of the query is not doing it (see code below). I am always getting repeated...
-
Hi, Im making an c# asp.net webservice and using LINQ for my DAL layer. Im using an dynamic select query like below and it works. But I dont like the performance because the query is executed in every if statement where the result of that if is true. Is it possible to execute the query 1 time at the...
-
This SQL query is used for getting one news item for each category. Can anyone help me on how to write this query in LINQ select * from News t where t.NewsID in ( select top 1 NewsID from News tt where tt.CategoryID = t.CategoryID order by tt.CreatedOn desc ) An early reply will be really helpful. Thanks...
-
Hello All, I have been stumped on his problem for a couple days now. We have a simple search page with 3 search criterias: - Gender - Age - Name We were instructed to create the search in such a way that the end user can select any number of criterias to perform a search such as: Gender = Female, Age...