I’m trying to publish a database using Visual Studio, the project has no issues plus I downloaded the (Data storage and processing) toolset. Yet I keep getting SQL:72025 error every time I try to deploy the project. SQL:72025: The referenced assembly .DLL is corrupt or invalid. I get the same message if I try to build the project too. Now
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
How to use Distinct in entity/linq based on certain columns (Remove duplicated values)
I want to remove the duplicated values from the columns ” 1)LabelName, 2)OpenLabelStandard, 3)Type “. The issue is that my table has four columns. beside to the three previous columns I have another one called 4)’Distance’. it is not a field from database. I added it to my table using some calculations in view model. the distance column is changeable
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
How do I retrieve scope identity with ExecuteNonQuery?
My project is using .NET Core 3.1 and I have my stored procedures executing in my repository class. I want to insert and return the scope identity(the id of the record that just inserted UserNumber) so I can use it for another stored proc within this same method. The problem I have here is that parameters[1].Value value is returning zero.
How to write just one query to divide result from 2 query?
I have a query in Entity Framework Core like below: I am dividing one currencyRate to another from 2 queries. There are 2 select queries. Only difference between queries is where condition. How to do this in one select query? Answer Pull both rows with Put an explicit order by on like Now you know the two rows you get
get request to accepts params in postman, currently sends a unsupported media type error
I’ve built different get methods using body request to select an id (with raw json). However, as I learned that get methods doesn’t support body request, I would like to change so that I can use params in postman insted. However, when I do it now, I get an 415 Unsupported Media Type. Here’s the method: Controller: Interface class: Before
ASP.NET Core display all rows in database on page
I am trying to display every row from a database on a website with ASP.NET Core MVC, but I cannot find any source on how to do it.. This is what Ive tried to do but I got stuck: My Database is structured like this: Id, Username, Password, PasswordHash, but I only want to display Username to begin with. If
To add dropdownlist using a secondary table column values
I have to add a dropdownlist to my existing project “moviesite”, i have a primary table moviestable for adding, edit delete movies. now added a new table Genre to add movieGenre. second …