I am using EF with a C# .NET 7 app.
For some reason, related entities are not being loaded when using the Include() method:
using var db = new ApexImContext();
var test = db.StorageRequestsVirtuals.Include(sr => sr.Reason)
.Include(sr => sr.VirtualServer)
.Include(sr =>...
I have a collection in my ViewModel which is:
public ObservableCollection<ReportAgentCallSummaryModel> ReportData { get; set; } = new ObservableCollection<ReportAgentCallSummaryModel>();
I am calling a method in a static class that takes this collection as a parameter and then uses ClosedXML to...
I am trying to improve the speed of a query that pulls data for a report.
For some reason the query I have written works perfectly fine in SQL Management Studio and returns the expected data.
If I run it from my app it does not return any data.
I have tried the following:
Wrap query in a...
I am currently in the process of writing some Windows Services to replace logic that is currently done within a WPF app.
There will be several service projects and a class library project for utilities/helpers.
I am having some issues figuring out the best way to structure the class library...
I have a logger class that is registered in the program.cs class of any asp.net core app.
After the user logs in, I would like to set some properties of that class (username etc) so that I don;t have to pass it to the logger every time I need to log an error.
Is it possible to set property...
I am trying to get a string back from a controller action when a user wants to retrieve a password.
I have it set up however I'm not sure how to get the returned string from the json data that is returned.
Can anyone point me in the right direction?
Table row
<td class="text-primary">******<i...
I have a data table where the rows are created from a list passed to the view in the model.
Each row has a checkbox for 'View', 'Add' and 'Edit'.
If the 'Add' or 'Edit' checkboxes are selected then I would like to have the 'View' checkbox selected as it is a dependent permission.
I can do...
I have a bootstrap modal within my main layout view that is used for displaying error messages.
Whenever there is an error I take the following action:
Add error data to session
Redirect to relevant action
At the start of action, get error data from session and add to view bag
The main layout...
I have a user model as follows:
public sealed class DTOUser
{
public int UserId { get; set; }
[Required]
[Display(Name = "Username (*)")]
public string Username { get; set; } = null!;
[Required]
[JsonIgnore]
[Display(Name = "Password (*)")]
public string...
I have recently made the switch to .NET Core and am using the built in DI for my classes.
I currently have a circular dependency and not really sure on the best way to resolve it.
I have the following classes:
LoginControl (ActionFilter) - Used to check that a user has been authenticated...
Can anyone give me some advice on if and how data stored in classes is shared between web clients?
I am in the process of completing a course on asp.net MVC and in the course they are storing user data in a static class after the user logs in.
Would the data stored in that static class be...
I am currently in the process of learning asp.net mvc with the goal of converting a WPF app to a web app.
The WPF app consists of a client application and a server application. The server application performs a few different functions, however the main function is to retrieve data via UI...
I am just beginning my journey to web app development. I have a very basic windows app that I would like to create as a web app.
The first thing I am struggling to figure out and cannot find much information on is how I would go about launching the starting view in a pop-up window that has a...
I have used material design in a previous project and had it load up with the dark theme. With this, I was using the 'MaterialDesignFloatingHintTextBox' style. In my previous app, this was picking up the font colour that was specified within the window/user control...
I am having some issues with getting my combo boxes selected item to display correctly.
I have a view model called 'ReportSkillCallProfileViewModel '. This view model has a property of type 'ReportSkillCallProfileFilterModel '. The 'ReportSkillCallProfileFilterModel ' the has a property called...
I am currently having issues whereby network ports stay in a listening state after I exit my application.
Currently I just have an exit button on the main window and shutdown all of the network elements as part of the command binding for that button.
On occasion, when re-loading the app I get...
I currently have my app set up in a way which the server imports data from CSV files and writes it to the database. The clients then read from the database rather than request data from the application server. This works fine however is quite inefficient as the data is being written and read...
For some reason I am having some issues with slowness when retrieving a very small amount of data from SQL Server.
I have amended the query to run in a new thread however it still takes a few seconds for around 20 rows with around 5 columns each to load.
This might just be the connection as I...
I have a dashboard in my app that retrieves data from the database every 3 seconds. I am currently using a dispatcher timer in the view model for this however it slows down the apps responsiveness significantly.
Can anyone advise on the best way to do this without locking up the UI thread? Once...
I am working on a project that heavily relies on the processing of real time data.
The application that collects the data has an adaptor that can be used to send all of the real time data to a configured IP address and port number.
I then need to have a service that will listen for that data...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.