Skip to content
Advertisement

Tag: linq

How to perform following query in LINQ?

I have a SQL query need to do in LINQ. Can anyone helps in converting? SELECT * FROM profile WHERE ProfileId <> 1221 AND IsActive = 1 AND ProfileId NOT IN (SELECT ReportingPerson …

choose a few id from db C#

I have a database and excel file And I want to export strings to excel How to export strings with 1 id I know The code you can see below _Hours = Rep.Where(o => o.Projects.ProjectGroupID == 4)….

Only returning one record in dataset

I am using ado .net in my web API and dapper and I have a function that checks the orders and the order lines it works fine if their only one order but if there an order without order lines it won’t …

LINQ Room id where user exists

I have two tables: ChatRoom Id (int) ChatUser (where i insert the users to the chat room, 1 row per user) RoomId (int) // Id from table ChatRoom UserId (int) I want to loop out all rooms where im in i do like this. But how do get the room id where the second user with the variable userId2 exists?

Advertisement