Tagged Questions
0
votes
1answer
77 views
Using SQL “In” instead of “Like” using %wildcards% in Linq
If I search within a description field using Linq I receive different results when searching with these two queries. First by this %MODULE%ALLEN BRADLEY% and then second by this query %ALLEN ...
-3
votes
0answers
49 views
Arrange SQL id with linq
After deleting some field,
I did not find a command directly in SQL server.
Then I tried with c# and linq.
I would reorganize MOVIE ID fields, and one account up to 1744
An error message
Thank you ...
-6
votes
0answers
18 views
LINQ Order by SQ not working correctly [on hold]
My topic seems to have died, but i still dont have a solution for it.
Please take a look at this topic.
LINQ to SQL Order By fails
Kind Regards.
-1
votes
0answers
46 views
Is it possible to use SQL procedure with Entity Framework(5) Code First? if Yes how? [on hold]
I am using sql procedure with Entity framework.
but not able to achieve the target.
i need some guide on this. I need some exp with CURD, return collection, and get value of output parameter.
...
5
votes
1answer
125 views
.Where(i => !i.IsDeleted) does not translate to SQL but .Where(i => i.IsDeleted.Equals(false)) does
I am using ASP.NET MVC 4 and Entity Framework 6 (Code First) and have some strange behaviour I do not want/like:
I have an entity class Images which has a boolean property IsDeleted and now I would ...
0
votes
4answers
362 views
Set tableAttribute mapping dynamically in linq to sql
I was wondering if it is possible to dynamically set the table mapping for the linq classes:
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.[Comfort 0601$Contact]")]
public ...
1
vote
2answers
49 views
Lambda expressions from sql
i am trying to do this in lambda :
Select Hint from [tablename] where Answer = 'answer';
this is what i have tried so far :
public ModelSQL.puzzlecontent GetAcrossClue(string answer)
{
...
0
votes
1answer
56 views
SingleOrDefault linq method throwing exception
I am using wcf rest service. I am querying sql server database to return me rows from the table name which i pass from GUI. What happens is that sometimes table doesnt exist in database and i am using ...
1
vote
3answers
41 views
Linq to SQL: WHERE IN statement
CREATE TABLE [MyNames]
(
[ID] INT IDENTITY PRIMARY KEY,
[Name] NVARCHAR(255) NULL
)
INSERT INTO [MyNames] VALUES ('John')
INSERT INTO [MyNames] VALUES ('Jane')
INSERT INTO [MyNames] VALUES ...
0
votes
0answers
70 views
LINQ to SQL Order By fails
Im having a little problem trying to Order By Row.TimeStamp which is a SQL DateTime.
I believe a picture says more than a Thousand words, so here is one! :)
Picture
As you can see it mixes other ...
0
votes
3answers
90 views
Convert Linq to SqlCommand
What is the equivalent of this Linq query in SQL Server query?
IEnumerable<Profile> profiles = am.Profile.Where(a => articles.Select(b => b.ProfileId).Distinct().Contains(a.ProfileID));
...
0
votes
0answers
35 views
MongoDB C# Driver - Use Linq Select from SQL Server InsertBatch into MongoDB
Instead of creating a ForEach statement to do a MongoDB insert statement for each record I would like to select all the records using Linq from SQL Server and insert all of them as one insert ...
0
votes
1answer
37 views
Complex SQL Query for a custom role provider
I have an ASP.NET custom role provider with the following tables.
[Role] RoleName( PK, nvarchar(100) );
[PermissionGroup] PermissionId( PK, int );PermissionGroupName( nvarchar(256) );
...
0
votes
1answer
63 views
LINQ to SQL complex query
I have the following object
public Cell {
public string CategoryId {get; set;}
public DateTime FromTime {get; set}
public DateTime ToTime {get; set}
}
I have a DB table that is called ...
0
votes
2answers
67 views
LINQ - conditional where on datatable
I've read a few posts about conditional where clauses and Linq. I believe I have implemented this correctly, but when I use Linq the query returns 0 records. However when I use the SQL counterpart of ...