linqer

LINQ to Entities does not recognize the method Double Round(Double, Int32, System.MidpointRounding) method

大兔子大兔子 提交于 2019-12-24 10:44:34
问题 I've tried the below LINQ Query in Linqer it is working fine but it is giving the below error while i tried with C# from IHeal_Mnt_Tickets in iHealEntities.iHeal_Mnt_Tickets where Tickets.Active == 1 && Tickets.MntID == 1 && Tickets.InsertedOn >= fromdate && Mnt_Tickets.InsertedOn <= todate && (new string[] { "Resolved", "Assigned" }).Contains(Tickets.status) group Tickets by new { Tickets.Instance } into g select new { Instance = g.Key.Summus_Instance, Assigned = (Int64?)g.Count(p => p

How do I convert complex T-SQL into Linq

痴心易碎 提交于 2019-12-12 17:01:32
问题 I am working in an Asp.NET Core 2.0 project, using EntityFramework Core 2.0. I am trying to convert an existing legacy SQL stored procedures into Linq in EntityFramework Core and I am having difficulty with this particular segment of T-SQL; SET @Target = (SELECT MIN(A.[Serial]) FROM (SELECT [HighSerial] + 1 AS 'Serial' FROM [Efn] WHERE [Mid] = @Mid AND ([HighSerial] + 1) BETWEEN @MinSerial AND @MaxSerial AND ([HighSerial] + 1) NOT IN (SELECT [LowSerial] FROM [Efn] WHERE [Mid] = @Mid)) A) I

Linqer won't do this SQL.. :(

情到浓时终转凉″ 提交于 2019-12-11 13:15:39
问题 I have this quick query but since my table is named User (SQL keyword), Linqer (a SQL to LINQ converter) fails to convert the SQL query. Here is the query: SELECT TOP (100) PERCENT dbo.[User].OID, dbo.[User].FirstName + ' ' + dbo.[User].LastName AS [User Name], COUNT(dbo.AssignedCounty.OID) AS [Counties Assigned], dbo.UserType.Name AS [User Type] FROM dbo.UserType INNER JOIN dbo.[User] ON dbo.UserType.OID = dbo.[User].UserTypeID LEFT OUTER JOIN dbo.AssignedCounty ON dbo.[User].OID = dbo