Category "c++sharp"

Fetch Products from database with category and subcategory attached

I am building a web api and want to fetch all the products from product table I have in my database and I also want to include the category and subcategory whic

How to compare date in string type in SQL query using MS Access and OLEDB

I am using MS Access as database and using OLEDB. In database I am storing dates as strings. I can't change them in date type (I know it would be easier to work

ASP.NET MVC / Entity Framework - Controller generation is somehow using old properties

After adding and altering columns in the SQL database, I've refreshed the Entity Model (Entity Framework 6) and deleted all controllers and views, to generate t

Office.Interop.Word - app.DisplayAlerts = WdAlertLevel.wdAlertsNone; Not Disabling Alerts

I'm trying to disable read-only alerts when opening word files in C#. I initially tried app.DisplayAlerts = false. This did not work and I believe it's because

Im not able to mock ServiceBusReceivedMessage and ServiceBusMessageActions

we want to write unit-test for servicebus message trigger. we are using Azure.Messaging.ServiceBus nuget package [FunctionName("serviebustrigger")] publi

how to launch AR apps on emulator?

I'm developing an AR app using unity but I don't have an android mobile so I decided to work on an emulator and I read all documentation about it but it didn't

XAF - Stop auto save when trying to add new child in parent child view

When trying to add record in child view, it require to save the parent record. how can i stop this behavior? Look into the photo

How to convert seconds to minutes in MVC?

I get the input as a second from the user and I want to show it as minutes and second in the Grid. I know I have to use a method but I don't know how. **Seizure

.NET 6: How to use method overloading in console app Startup?

.NET 6 offers boilerplate-removal in console applications Startup class. I try to run this simple test code: Console.WriteLine("Hello, World!"); static void Te

dotnet 6 minimal API circular serialization

I am new to dotnet, trying out dotnet 6 minimal API. I have two models: namespace Linker.Models { class Link : BaseEntity { [MaxLength(2048)]

How to line up objects along a drawn line?

I try to do the following: at the bottom of the screen there is a small window for drawing a line, in the center of the screen there are objects that line up in

Is it possible to make local HTTP calls in Blazor Server?

We are using Blazor Server for our application. Some of our users have intranet rest web api's in their local environment that is not accesible from outside wor

XML deserialization not binding list of strings

I am trying to deserialize xml into c# classes. I followed some documentation and generated some c# classes using the commands xsd foo.xml & xsd foo.xsd /cl

Pass multiple parameter to Ajax from link in MVC Core

I have this link <a asp-action="goPay" asp-route-id="@item.Appid" asp-route-mem="@item.Memid" asp-route-amt="@item.Areq" asp-controller="Withdraw" class="btn

Proper way to use ViewBag for selectlist

I am getting an error on my selectlist when I open the form. Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'Cannot convert type 'System.Collections.Gen

How can I reduce the amount of files produced by dotnet publish command line? [closed]

I tried to publish my dotnet app using dotnet publish --output publish --configuration Release but the result not as expected because the last

How to get requested GraphQL fields in C#?

I'm working on a GraphQL -> SQL parser that includes some joins, so it makes a performance difference whether a certain field is requested. Is there a way to

How to get focused window handler

I have a WPF custom virtual keyboard application. I need to host this WPF application as standalone and user should be able to use this to enter values for any

NetworkStream.read taking 2 seconds to read data from stream (TCP C#)

I have a TCP request response model in C# where I am communicating with a server. Once the server has written data to the stream, I am reading that data. But st

Regex to recognise valid NuGet package filenames

Some NuGet packages have filenames that look valid but are not. Perhaps the versioning does not comply with semver or the name of the package confuses NuGet's p