Questions tagged [.net-core]
.NET Core is an open-source successor of the .NET Framework. It can be used in a wide variety of applications and verticals, ranging from servers and data centers to apps and devices. .NET Core is supported by Microsoft on Windows, Linux and macOS.
.net-core
45,031
questions
-4
votes
1
answer
90
views
System.ObjectDisposedException: 'Cannot access a disposed object. Object name: 'MySqlConnection'.'
I am trying to join several tables created by ASP.NET Core identity. However the above error keeps getting thrown.
This is the join statement:
var customers =
await context.Users
...
-4
votes
1
answer
43
views
Getting Not all code paths returns a value when i gave return type as boolean [duplicate]
enter code here public bool GetComprehendMedicalModel(string claimId)
{
try
{
var userId = _ClaimData.GetUserIdFromCalim(claimId);
_PDFProcess....
-4
votes
2
answers
73
views
Error developing web project + api + SQL Server + dotnet
I have to develop a small project that accesses a SQL Server table and returns a JSON on HTTP-REST. I tested a direct project to access my program.cs direct database and it worked, but when I tried to ...
-4
votes
2
answers
2k
views
How to submit http form using C# in DOTNET CORE [closed]
I had created an HTML form using c# string builder using reference: https://stackoverflow.com/a/37757601/7961948
and in dotnet, we could submit this form using
Response.Write(formPostText);
But ...
-4
votes
2
answers
100
views
Azure Function - Call function from another function
I have one function created in .net core and i face some problem in send mail.
I am thinking to create another function in .net framework that send mail.
I need a solution that will do following,
....
-4
votes
1
answer
3k
views
Run .NetCore App in docker container based on .NETCore 3.0 preview
On running my app exited with code 150
Output: Debug
You may only use the Microsoft .NET Core Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software
to help you ...
-4
votes
1
answer
208
views
Making REST API Requests (GET/POST/PUT/DELET) in c# console
I want to connect from .NET CORE to a Rest API that will do the operation (GET/POST/PUT/DELETE) and get the answer, but I do not know how
-4
votes
1
answer
173
views
C# - Manipulate a text file programmatically
I am writing a backend API that generates a structured textfile. Based off user input certain strings are filled via interpolation
// actual string literal
string message = $@"Version {version} of ...
-4
votes
1
answer
98
views
api call get failed, CORS, nginx is confiured
hello and thank you for your time
i have a dotnet core web api application running on port 6000 and an angular application, using nginx i reverse proxied https://api.asoode.com to donet core ...
-4
votes
1
answer
586
views
Does mongo lock documents in bounds of UpdateOneAsync call?
I need to make a field of a document updatable only once with a specific value, even in a concurrent environment. For example, a document with an Id 123456 has a (string) field SomeField with initial ...
-4
votes
2
answers
300
views
ItemsControl in a list view
I have some defined XAML that looks like
<ListView ItemsSource="{Binding ConfigItems,Mode=OneWay}" Margin="5">
<ListView.ItemContainerStyle>
<Style ...
-5
votes
1
answer
244
views
Why do we need to keep declaring basic packages like Using System in .Net Core
At the beginning of learning .Net Core and I cannot understand why .cs files need to keep importing system packages when they should be part of .Net Core anyway?
I don't have to import any such ...
-5
votes
1
answer
1k
views
How to get by Id from a repository Class .NET Core MVC
I have a repository.cs file like this:
private static List<AdminResponse> responses = new List<AdminResponse>();
public static IEnumerable<AdminResponse> Responses => responses;
...
-5
votes
2
answers
8k
views
DateTime Format yyyy-mm-dd 24hr
How to format a DateTime as follows?
yyyy-mm-dd hh:mm:ss in 24 hr format
example
2001-03-16 14:45:00
-5
votes
1
answer
502
views
Store timestamp in format 'DD/MM/YYYY HH24:MI:SS:MS' in Postgres DB
I want to store date & time in my Db in format DD/MM/YYYY HH24:MI:SS:MS. E.g, 15/10/2022 22:42:43:682.
But it is actually stored in DB as Oct 15 22:42:43.
I couldn't find any relative info except ...
-5
votes
1
answer
277
views
Run raw SQL statement inside my .NET core console application and map the results to C# variables
I have the following SQL statement to get data from multiple tables inside my SQL Server database:
SELECT max(ad.ORG_NAME) AS "Account", wo.WORKORDERID AS "Request ID", max(aau....
-5
votes
2
answers
63
views
Not sure how to properly do this
Ok, so working on a dotnet Core 2 console app that I'm designing to run either on Windows or *Nix. Now the the part I'm trying to figure out is I want to only have one code base and let the code ...
-6
votes
1
answer
797
views
What is the difference between .net Core multi target and .net Standard?
.Net Standard is used to can be use the same library in different type of projects, such as WPF, xamarin, UWP... etc.
.Net Core can't by default, but there is the possibility to configure the multi ...
-6
votes
1
answer
88
views
Efficiently finding arrays with the most occurences of the same number
Let's say I have the following nested array:
[
[1, 2, 3],
[4, 7, 9, 13],
[1, 2],
[2, 3]
[12, 15, 16]
]
I only need the arrays with the most occurrences of the same numbers. In ...
-6
votes
1
answer
2k
views
What to use instead of WCF in .NET Core? [closed]
Windows 10, .Net Core 3.1
How to do the processes communication on the same computer in .NET Core 3.1? I used WCF for these purposes when I used .NET Framwork earlier, but .NET Core hasn't WCF. I ...
-6
votes
1
answer
144
views
Sorting an array of n people alphabetically [closed]
I know stackoverflow has many questions like this one, but it appears that none of them are actually a solution to this.
I had a coding interview three weeks ago and one of the questions been "...
-6
votes
1
answer
315
views
Multiple conditional where on list c#
I need to add multiple conditional where on list but i can't
List<Account> accounts = getAccount();
and after on my liste i need to apply multiple condition like this how can i do it please ...
-6
votes
1
answer
1k
views
unable to cast object of type 'system.windows.forms.bindingsource' to type 'system.data.datatable'
I'm experiencing the following exception
unable to cast object of type 'system.windows.forms.bindingsource' to type 'system.data.datatable'
Here is my method
private void ...
-6
votes
1
answer
673
views
get values from nested JSON array
How can I get individual values from this JSON? For example the SSN? Also, some items are arrays that can hold multiples (addresses, phones). What is the best way to parse this? I have tried with ...
-6
votes
2
answers
171
views
Passing json data list to HttpPost controller in ASP.NET Core 2.1
I have a model:
public class NotificationsDeliveryTypesIds
{
public int NotificationGroupId { get; set; }
public int DeliveryTypeId { get; set; }
public int UserNotificationTypeDeliveryChoiceId {...
-6
votes
1
answer
1k
views
How do I get the video upload link for uploading a video to my Vimeo account?
How do I get the video upload link for uploading a video to my Vimeo account using the Vimeo API with C# and .Net Core?
Answer will be a method that will be called like this:
var vimeoUploadUrl = ...
-6
votes
1
answer
464
views
How do I delete a video in my Vimeo account?
How do I delete a video in my Vimeo account using the Vimeo API using C# in .Net Core?
-7
votes
1
answer
2k
views
(C#) How to remove the "Hello World" line when starting a new console application [duplicate]
I am using Visual Studio 2017. When I start a new Console App(.NET Core) it comes with a Console.WriteLine("Hello World!") by default. My question is if there is a way to permanently remove this line ...
-7
votes
1
answer
228
views
Real projects on .Net Core [closed]
I need to write essay about .Net Core and about real projects written on it.
But i can not find any examples of such projects.
Can you tell me some examples of real .Net Core projects?
Or they do not ...
-8
votes
2
answers
7k
views
Get User's Ip address using ASP.NET Core 3.1 Web API [closed]
I'm using ASP.NET Core 3.1 Web API. I'd like to get the user's Ip address. I have been stuck for a long time, please help me, thank you so much!
-8
votes
2
answers
117
views
Why does this assignment statement work in the .NET Framework but not in .NET Core? [closed]
This is a connection string for a database:
private string _connString => $"Data Source={Server.MapPath(@"~\Data")}\\PhoneNumbers.sqlite";
My friend used this line in a .NET Framework program ...