All Questions
372
questions
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 ...
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 ...
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 ...
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 ...
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 ...
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)
...
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
...
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 ...
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)
{
...
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 ...
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(...
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 | ...
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();
...
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 ...
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 ...