Skip to main content

All Questions

Tagged with
0 votes
1 answer
68 views

Loop through a subset then the main set C#, Razor, linq, Umbraco

I am trying to add a featured items feature to my page in umbraco where people can add the pages they want to highlight and then compare those IDs with the search results and output the featured items ...
Squidgybuffalo's user avatar
0 votes
1 answer
73 views

Why is this Linq query tied to a Blazor parameter returning nothing back?

I have a Linq query that is attempting to filter data down based on a selected meal type which is located inside a CSV file. The CSV file is being processed by CsvHelper and is represented by a ...
islandmonkey's user avatar
0 votes
0 answers
29 views

I'm gettin error about something call "Lambda"

@foreach (var item in Model.ozellikler) { if (item.ozellikAtama != null && item.ozellikAtama == 0) { \<h3\>@item.ozellikAdi\</h3\> var ...
Michael Mandacı's user avatar
0 votes
2 answers
48 views

How can I Sort this MVC Drop-Down list alphabetically but IGNORE brackets?

I have a dynamic dropdown list that I need to sort alphabetically, but the issue is, there is some text within brackets that appears on top. I was asked to sort the text in brackets alphabetically (in ...
PLC8's user avatar
  • 3
0 votes
1 answer
32 views

I am lost with the Linq Shorthand IN clause

I have searched and found lots of almost understandable answers but either I am totally bonkers or they just don't fit in my LINQ Shorthand syntax. I looked at all the "similar duplicate ...
JustJohn's user avatar
  • 1,430
1 vote
1 answer
57 views

Sorting string with number in Umbraco Razor

In a Umbraco site I have an address in a string, so that string will contain a number, like: Street Road 2, Street Road 14, Street Road 22b etc. I am sorting the list by address (among other values) ...
Morten Hagh's user avatar
  • 2,095
0 votes
1 answer
112 views

How to change values inside IQueryable (not database)

Question: How to change values inside IQueryable? (dont change inside database) Query has data from database. IQueryable<My_Model> Query = from x in _context.My_DbSet ...
dave's user avatar
  • 180
0 votes
1 answer
317 views

Net Core- add data to different model

I am pulling the extra materials on the order page in my project. Since the model on this page is product, I need to run a cart class to add to cart. But I don't know how to do this with asp-for. How ...
Ramazan Musluoğlu's user avatar
0 votes
1 answer
163 views

To convert if condition to linq in cshtml

Code if(Model.CurrentStatus == 1 || Model.CurrentStatus == 2) { //can display those records.. } else if((Model.CurrentStatus == 3 || Model.CurrentStatus == 4) && Model.Date != null) { ...
Earth's user avatar
  • 3,543
0 votes
2 answers
333 views

Option to join objects in list with list from other db

I have 2 databases and folowing models For db 1: Public class StorageItem { public int Id { get; set; } public string Name { get; set; } } for db 2: public class Storage { public int ...
Pearl's user avatar
  • 39
1 vote
1 answer
2k views

Chartjs background color multiple Dataset

I have a script for Chartjs like: <script type="text/javascript"> var dataname = @Html.Raw(Json.Serialize(ViewBag.performancename)); var dataquo = @Html.Raw(Json.Serialize(...
Haminteu's user avatar
  • 1,334
0 votes
2 answers
113 views

find if there are any null row in left join linq

Table 1 is as follows: |ID | StartDate | FoodID | |----|-------------|---------| |5 | 21 May 2021 |F1 | |6 | 27 Sep 2021 |F2 | Table 2 is as follows: |ID2 | ID | Date | ...
devMe's user avatar
  • 29
1 vote
4 answers
180 views

Edit data result got from LINQ

I have retrieved data from database using a LINQ query. var data = (from z in db.BlogPostTbl where z.PostId == id select z).ToList(); ...
nischalinn's user avatar
  • 1,143
0 votes
1 answer
178 views

Count, order desc and select top 4 values for ASP.NET

I am trying to create a table that shows the top 4 nationalities in my database for my .NET application. I can do it using SQL following this. This is the result in sql However, what I need for my ...
FlyingSpiderMonkey's user avatar
0 votes
1 answer
173 views

Order dropdown with alphabetic and numeric characters

I have a dropdown in my .NET Core app that I want sorted, the following options exist: Multimachine 2-machine Longmachine Cutter Vshape 4-machine Cooler Infeedmachine 3-Machine Mainmachine I thought ...
RDAxRoadkill's user avatar

15 30 50 per page
1
2 3 4 5
25