Skip to content
Advertisement

Tag: asp.net-core

Convert Sql to linq with groupby

I have view on which I use this request And it’s running sucessfully and get me this data How I need to write it using linq to get same data? I tried like this But on new HumpChartDto() {SpendBand = x.SpendBand} I got Cannot resolve symbol ‘SpendBand How I can solve this? Answer First, after grouping on SpendBand, you need

Write a SQL query with a subquery in .NET Core using Entity Framework that returns a list of items with varying number of returned child rows

I have this test SqlFiddle: http://sqlfiddle.com/#!18/05fce/1 The idea is that for each product (table webspiderproduct) it will return the lowest price from each shopId from the table webspiderproductprice. So the returned data should look like this: I am using SQL Server. In pseudocode should I write a and then do a foreach through each row using linq and then add

Error – NetTopologySuite( When writing a SQL Server geography value, the shell of a polygon must be oriented counter-clockwise)

All, I’m using NetTopologySuite/ Entity Asp Core for my project. I want to create a radius of 1000 meter for the ‘searchArea ‘ When I’m running the the app it gives me an error : System.ArgumentException: When writing a SQL Server geography value, the shell of a polygon must be oriented counter-clockwise. My View ps: I could achieve this query

Advertisement