Most voted "asp-net-core" questions
40 questions
Sort by count of
-
4
votes2
answers884
viewsProblem with currency percentage and rounding
How to maintain monetary values with only 2 decimal places when performing percentage operations? Example: Total value: R$ 377,17 Percentage divisions: 33%, 33% and 34% Problem: the sum of the value…
-
3
votes1
answer131
viewsAspnet Core API with Entityframework Core - Disconnected Entiades
My scenario is the following: I have an Aspnet core API that uses Entityframework for data access (postgree database). When I receive content in Json by the API (Put) and need to update the template…
-
2
votes1
answer277
viewsCheck if cookies exist in ASPNET CORE
I’m migrating from the Asp.net Webforms to the Core 2.2 and in the application, we stored information such as Id, and other parameters. In Asp.Net Core I use Seguinte Iactionresult to record the…
-
2
votes1
answer60
viewsUpload progress with angular 6 and Asp net core 2.2
I am sending a file selected by the user in the browser through the tag "input" to the Asp net core and would like to display the progress of the upload. I currently only get the Enum…
-
2
votes0
answers27
viewsContext User does not return username Asp Net Core 3.1 C#
I’m trying to get the username logged in by the User context inside a controller. I’m using Identity to manage login and JWT to authenticate requests in my controller. I can get the values:…
-
1
votes2
answers290
viewsDoubt in passing parameters via AJAX to ASP NET CORE Action
Friends, I’m having trouble passing a value to the action of a specific controller that takes as parameter an id of type int. AJAX var dataForm = $("#statisticId").val(); $.ajax({ contentType:…
-
1
votes0
answers37
viewsHow to put images in the select tag in Asp-net core?
<select> <option background="https://lipis.github.io/flag-icon-css/flags/4x3/gb.svg">gb</option> <option…
-
1
votes0
answers75
viewsCommunication with jwt between two APIS
Staff would like a recommendation: I own an angular site that communicates with an API[API 1] Asp net core and authentication is done via jwt token. This API communicates with another API[API2] also…
-
1
votes2
answers151
viewsHow to create Function in Database with Migrations Ef core?
I created a Function in Postgresql and would like it to be generated together with the database in the initial Migration. I tried it this way and I didn’t get any results protected override void…
-
1
votes1
answer245
views.net core json files
I am making a simple web application, it will read a json file: { "hotelName" : "Jumeirah Creekside Hotel", "thumb": "https://loremflickr.com/130/100/dubai", "stars" : 5, "location" : "Garghoud",…
-
1
votes1
answer46
viewsWhat do you call the cast() function of the database in the ORDER method of a database in a LINQ expression in C# C#?
I have a field that stores DATETIME in my database. However I need to ignore the time of this field when I am ordering for it. The following code makes my search: public virtual async…
asp.net entity-framework linq linq-to-entities asp-net-coreasked 5 years, 6 months ago Daniel Silva 11 -
1
votes1
answer33
viewsHow to receive querystring value in an action?
I am creating an API with ASP.NET Core and would like to know how to do a search via querystring, in case the URL sees something like /api/programas?nome=teste Like I would in my controller? Example…
-
1
votes1
answer211
viewsHow to close Bootstrap Modal?
Before anything I say I read other posts... Close modal when you click the button I am developing a system in ASP NET Core and using a modal of bootstrap to log in. I sent the data to the controller…
-
1
votes1
answer231
viewsUpload image with Vue.js + . net core 3.0
I’m trying to upload an image, but the image always comes as null on my controller This is my Viewmodel which I receive the image: public class UpdateViewModel { [Required(ErrorMessage = "Nome é um…
-
1
votes0
answers25
viewsSimultaneous rescue of related entities
Good afternoon. I am having a difficulty that I believe is something very simple but as I am new in the area I am facing an absurd problem. I have 2 entities (at the example level), one called…
-
0
votes1
answer167
viewsEF Core error when applying update-database
I’m creating the table AspNetUSers while applying update-database The following error occurs You have an error in your SQL syntax; check the manual that Corresponds to your Mysql server version for…
-
0
votes1
answer33
viewsIs it possible to put the translation files in folders to get more organized?
I would like to put the translation files organized by folders in this way Everything in the root of the folder Resources works but moves into that other folder stops working as I can configure so…
-
0
votes1
answer167
viewsHow to group records by month and year within a list of objects? ASP NET CORE
I am trying to group the objects of a list by month or year, before returning the same. I am trying this way and I did not succeed. foreach (var item in passList) { pass_obj = new Pass_returnDTO();…
-
0
votes0
answers46
viewsAspnet Core Synchronization Context (deadlock)
I had a problem with deadlock in my code in . Net framework, follows below the excerpt from it: public IHttpActionResult Get() { AsyncCall().Wait(); return Ok("Ok"); } private async Task…
-
0
votes1
answer253
viewsWhere do I find Web.Config in ASP.NET CORE MVC 3.1?
I’m having problems with accentuation in a View, already opened in the notebook my view’s in . cshtml and save all with UTF-8 but it is still having accentuation problem in the application still, I…
-
0
votes1
answer57
viewsPerformance issues with Asp.Net Core 2.1?
I have an API written in Asp.Net Core 2.1 and I have some performance problem, I am not able to understand if the problem is in the code or the server. The problem boils down to the following, I…
api performance iis entity-framework-core asp-net-coreasked 4 years, 1 month ago Renner Oliveira 23 -
0
votes0
answers31
viewsError creating tables - ASPNET-CORE-C#
Good afternoon to you all. I am studying C# with Asp Net Core and I am having problems in a matter of a job. I need to create several tables (consultation, doctor, patient...) within the…
-
0
votes0
answers506
viewsHow to set up IIS on the Windows Authentication server (via Active Directory) of an Aspnet Core C#?
Sirs, I have an application very similar to the visual studio 2019 ready template. There, through the 'Users.Identity.Name', I obtain the AD data of the authenticated user as below: public…
iis asp.net-identity deploy asp-net-core iis-web-deployasked 5 years, 4 months ago Arthur Gresele 1 -
0
votes0
answers83
viewsGetting null using external api with restsharp
I am facing a problem when trying to get an external API that returns Json. Instead of storing the value of json variables in the model is receiving null. Model: namespace bitcoin.Models { public…
-
0
votes0
answers262
viewsEF Core - "A command is already in Progress"
I am requesting a Function in the database where it returns the values to be saved, but before saving I need to make a check if there is no same data, when I do this check with EF core it returns me…
c# asp.net entity-framework entity-framework-core asp-net-coreasked 5 years, 3 months ago iago soares 92 -
0
votes1
answer16
viewsLoad Visual Studio Projects to Vscode
Good night to you all! I always developed my web applications in C# with Visual Studio, but now by necessity I need to go to Visual Code. Could you give me some tips on how to use Visual Code in…
-
0
votes1
answer187
viewsException released when deleting registry using Entity Framework Core. How to resolve?
When trying to delete registration of entities "Patients" and "Doctors" is returned an exception. The strange thing is that for the entity of "Schedules" everything happens normally. Follows the…
c# asp.net-mvc entity-framework entity-framework-core asp-net-coreasked 5 years, 2 months ago Ramon Almeida 382 -
0
votes0
answers98
viewsIntegrating C# projects with VB
I need to create a C# project that uses a DLL that was written in VB.NET. I added the dependency, imported the library and used the method. However, at the time of execution when I will consume a…
-
0
votes0
answers124
viewsHow to set up Hangfire authentication in Production
I’m using Hangfire to manage background tasks, it works normally when I’m on localhost, but in the production environment I’m not being able to set up the authentication needed to open Dashboard I…
asp.net-mvc asp.net entity-framework asp-net-core hangfireasked 4 years, 11 months ago iago soares 92 -
0
votes1
answer36
viewsCount how many id you have in the table based on other data
Hello I’m trying to make a chart in aspnetcore using EF, I have a table Events in it contains a FK Idarea that determines the area of the event I wanted to count how many events you have of each…
-
0
votes1
answer30
viewsError loading partial view (aspnet core with Dapper)
I am new with the use of Aspnet Core 3.0 with Dapper and I am having difficulties to load a partial view in the main view. I want to upload client contacts to a list: Client (view) and Contacts…
-
0
votes0
answers75
viewsError when implementing Swagger
I am trying to implement Swagger in my application but I got the error by uploading the application I did it by following the microsoft documentation, but, I did not succeed. It seems a very generic…
-
0
votes1
answer84
viewsHow to extract CNPJ from A1 . pfx or . P12 Digital Certificate on Linux and Windows using . NET Core?
I’m developing a system where we register companies by digital certificate, where the user uploads the file, puts the password and imports. I need to extract the CNPJ that is within the certificate…
-
0
votes0
answers15
viewsValidation of Google User Token in the back end
I’m facing a problem and I’ve already lost hours on forums and on google certification, but I can’t find the solution. I have the following scenario: A front-end that is from a third company logs in…
-
-1
votes1
answer35
viewsASP NET CORE 5 EF with DLL database-connected
It is possible to use a database connection DLL in an ASP NET CORE 5 project with Entity Framework? I have a DLL named "Bancodados" as I can use the methods of this DLL in the context of the…
-
-1
votes1
answer372
viewsUser.Identity.Isauthenticated always returns false
I am implementing stunning and authentication with Identity using the concept of Claims, after I login, I am not able to save the authorization, the login returns 200 ok, but is not authorized…
-
-1
votes1
answer168
viewsValidation with more Net Core MVC fields?
I need to validate on a form made in ASPNet Core MVC, but in this validation I need to use more than one field, example below: Models: public class Fornecedor { public virtual int ID { get; set; }…
-
-1
votes2
answers63
viewsForms in Modal Bootstrap
I’m with a system that all forms (Views) are in Modal Bootstrap. The View Index loads all Partialview. Below the Index: By clicking the Register button, for example, a Javascript function accesses…
-
-1
votes1
answer15
viewsConvert datatable to Json
Datatable data can be stored in JSON? I have this code: public List<AgendaModel> MostrarTodosCalendar() { List<AgendaModel> lista = new List<AgendaModel>(); AgendaModel item; DAL…
-
-2
votes1
answer20
viewsLogin redirect error iphone - Correlation failed
I’m having problems logging in through google and facebook when accessing through an iphone, after I authenticate my account, on google for example, callback is not called generating an exception.…