c# - How to represent The SQL query in Linq -
I have SQL query but have difficulty in converting to linq. I'm new to LINQ.
The selection statement of my SQL is as follows: Select I know this is simple and easy x.ParentCategoryID == objutblCategoryMaster; I have tried this selection from objutblCategoryMaster = {classID = objutblCategoryMaster.CategoryID, CategoryName = db.utblCategoryMasters.Where (x = gt) => results in the After getting involved with one you can get results. Results at If you are using the unit framework and the navigation properties are set correctly, then you can make it something easier ... < pre>
in CM.ParentCategoryID (Select from the CategoryID as CM.CategoryName as dbo.utblCategoryMaster from Dbo. UtblCategoryMaster where CategoryName = 'Events')
results at = db.utblCategoryMasters. CategorID & gt; ; Amp; x category name == "event")}; Return result. CoptoDataText ();
= db.utblCategoryMasters .Join (db.utblCategoryMasters.Where (c => c.CategoryName == "Event"), cm = & gt; cm.ParentCategoryId, c = & Gt; c.CategoryId, (cm, c) => new {cms.schearti, cm range name});
var results = db.utblCategoryMasters. where (cm = & gt; cm.ParentCategory.CategoryName == "event") .Select (cm = & gt; new {cm.CategoryId, cm.CategoryName});
Comments
Post a Comment