As I am new to Linq and Entity Framework, I don't know how I add comma sepearted and left join in linq/Entity code. My Sql query is rather big and I want it to be convert in Linq/entity: Select DISTINCT SR.StudentRequestId,SR.RegistrationId,SR.Location,SR.PaymentMethod,SR.CreatedOn,C.ClassName,CC.CampusName, CASE WHEN ISNULL(TSR.StatusId,0)=0 THEN 1 ELSE TSR.StatusId END AS StatusId, substring( ( Select ', '+REPLACE(REPLACE(ST1.FromTime,'AM',''),'PM','')+'-'+ST1.ToTime AS [text()] From dbo.StudentRequestTimings ST1 Where ST1.StudentRequestId = SRT.StudentRequestId ORDER BY ST1.CreatedOn For XML PATH ('') ), 2, 1000) [Time] FROM StudentRequest SR Inner JOIN Registration R ON R.RegistrationId=SR.RegistrationId INNER JOIN Campus CC ON CC.CampusId=R.CampusId INNER JOIN Class C ON C.ClassId=SR.ClassId LEFT JOIN TutorClasses …

Member Avatar
Member Avatar
+0 forum 1

So here is my problem laid out as simple as I can put it. I cant combine multiple entities together that have related data but are different (one database table has id number that is shared by database table 2 and table 2 has employee number which is shared with database table 3, I need to limit the active employees in table 3 while searching for the current employees with id number “Something” because table 1 has their job details, which are also marked as active or none active and need to be limited in that search as well) Table …

Member Avatar
Member Avatar
+0 forum 2

Hi, I've recently "inherited" a part built project from a developer who as left our company. He had decided to use Entity Framework but I am finding it to be unstable and slow. I periodically have to reimport objects and stored procedures from the database as the model gets corrupted. I also find database processes to be slower than if I was just running stored procedures and ADO.net The latest fresh hell it has started to pull is an error *New transaction is not allowed because there are other threads running in the session.* I've looked on line and the …

Member Avatar
Member Avatar
+0 forum 5

Greetings, I am reading about Entity Framework and I stopped by a sentence that I do not understand it *You can simply iterate over the contents of any given DbSet and Entity Framework will send a query to the database to find all the data in that set. The query is sent to the database when the first result is requested by the application: that’s during the first iteration of the foreach loop. Entity Framework doesn’t pull back all the data at once, though. **The query remains active** and the results are read from the database as they are needed …

Member Avatar
Member Avatar
+0 forum 1

Hi, I have been working on the entity framework for a short span of time. My question is regarding savechanges() or rather what exactly is hapening in this scenario. I have 3 tables: Container , subcontainer, innercontainer there is a 1-n relation between tables in the specified order. i have added used the AddObject() to add the objects into the context and i am calleing save changes at the end of it all. But wen i so that i get this following error: "Unable to determine the principal end of the FK relationship. Multiple added entities may have the same …

Member Avatar
Member Avatar
+0 forum 1

The End.