Most voted "asp.net-core" questions
ASP.NET Core is a Microsoft framework as a redesign of ASP.NET.
Learn more…663 questions
Sort by count of
-
1
votes1
answer369
viewsDeserializeobject
I’m trying to use the DeserializeObject, to generate objects through the result json: { "cod": "200", "message": 0.0068, "cnt": 40, "list": [ { "dt": 1560286800, "main": { "temp": 17.14, "temp_min":…
-
1
votes2
answers64
viewsLower and higher value within Objects with the same date
I have the following Json: { "cod": "200", "message": 0.0055, "cnt": 40, "list": [ { "dt": 1560319200, "main": { "temp": 15.15, "temp_min": 14.49, "temp_max": 15.15, "pressure": 1021.11,…
-
1
votes1
answer215
viewsHow to access Ihostingenvironment outside of the Controller in ASP.NET Core?
I’m updating an ASP.NET Framework API to ASP.NET Core and I’m stuck in a problem. No. NET Framework used the following: public GmailConnection(){ serverCredentialPath =…
-
1
votes2
answers248
viewsError while trying to connect to another Rabbitmq server
I am trying to send a message to another machine in my network that already has the rabbitmq installed. The following error occurs: Error message: None of the specified endpoints Were Reachable When…
-
1
votes1
answer299
viewsChange float field to decimal
I have a field, which in the model was like float, and that’s how you got saved, and you already have data in those columns. But what happens is that now I need 6 decimal places after the comma.…
-
1
votes3
answers1381
viewsHow to declare an object parameter as null in C#
I have the following class in C# namespace Projeto.Models { public class Biblioteca { public int Id {get; set;} public string Nome {get; set;} public Livro Livro {get; set;} } public class Livro {…
-
1
votes0
answers40
viewsGet a company record
I am new in c#, I would like help to pick up and registered company by user X, what I need is the function Businessman Functioncontroller public async Task<IActionResult> Create() {…
-
1
votes1
answer40
viewsrefer to the logged in user’s id if missing
I’m doing a Net Core MVC point card project, in which I have user, company and employee registration. To register the company I need to get the id of the logged in user, I already have a function…
-
1
votes1
answer175
viewsHow to leave field with bold values
Situation I have a table made in html called Payments and in it I have a column called values, I want to leave the fields with values in bold. Problem: There are collaborators who had value to be…
-
1
votes0
answers22
viewsHow to split Context into multiple files?
I am refactoring a large project that has about three hundred tables using . Net Core and Oracle.Entityframeworkcore With scaffold it generates me a Modelcontext. However, it would be huge if I did…
asp.net-coreasked 5 years, 3 months ago Marcio Fonseca 31 -
1
votes1
answer519
viewsRedirect Http to Https on IIS
I’m setting up a server IIS to run an application asp.net core 1.0 but the application is https and by typing www.dominio.com.br it does not redirect to the https, I have already made the following…
-
1
votes1
answer66
viewsDefault value in Select List . net Core 2.2
In my system I have a select which returns the recorded data in your database table, the problem is that the list already starts with the first record automatically, and I need her to return a…
-
1
votes1
answer26
viewsHow to make the Morris Chart pick up information from an Asp.Net Core api
I have the following api coming from a controller called Vehicles Controller. // GET: api/Veiculos [HttpGet] public async Task<ActionResult<IEnumerable<Veiculo>>> GetVeiculos() {…
-
1
votes1
answer285
viewsError with modal using Partialview Asp Net Core 2.2
I’m getting the following error in my project: Invalidoperationexception: The model item passed into the Viewdatadictionary is of type 'System.Collections.Generic.List`1[Helpdesk.Models.Suppliers]',…
-
1
votes1
answer268
viewsRegistration with Modal and Partialview . Net Core 2.2
In my project I created a button for registration, which calls a modal that is inside a PartialView. The objective is to register through this modal the data informed in the database, the problem…
-
1
votes1
answer81
viewsHow to pass an Enum type parameter together with the Model for a Partialview - Asp.net Core MVC
I’m having a hard time passing an Enum parameter to a Partialview using Viewdata. It is giving conversion error (in Partialview), because the received type seems to be string or other type and is…
-
1
votes2
answers119
viewsSQL connection to Dapper/Asp.net Core
I’m starting in Asp.net Core and I’m having difficulties to connect my Sql database. Below is my Model My class of connection appsetting.json startup.Cs Controller Error shown when trying to execute…
-
1
votes0
answers128
viewsDisengage Identity and handle Identityuser in the domain - Asp.net Core MVC 2.2
I want to implement Identity on my site, but not the way it comes in the MVC template with auth Individual from . net core 2.2, because I want to handle the Identityuser class on my domain, so that…
c# asp.net-mvc asp.net-core asp.net-identity identityasked 5 years, 2 months ago Márcio Sebastião 769 -
1
votes1
answer158
viewsEntity Building and Corporate Ownership Modeling in the DDD CQRS standard
I am creating an ERP type application, and I am using the DDD CQRS Standard, where at the initial moment of the project I am creating the entities of customers, suppliers and carriers, where they…
-
1
votes2
answers298
viewsShow/Hide Divs using functions - Javascrip and Asp.Net Core MVC
I have two Divs, whose contents will house some Fields specific to my page. I need to keep such Ivs always hidden, so that when necessary, I hide one and display the other and vice versa. For this,…
-
1
votes1
answer2188
viewsNullable Object must have a value
I have this SELECT, where m.EmpresaID may come null: var pesquisa = from pro in db.Produtos join prodempresa in db.ProdutosEmpresas on pro.Id equals prodempresa.ProdutoID into Details from m in…
-
1
votes1
answer616
viewsVersion incompatibility 'Microsoft.AspNetCore.App'
Good afternoon, I’m starting my studies with. NET Core for a project and had to change computer, while restoring the project I am having the following problem: It was not possible to find any…
asp.net-coreasked 5 years ago Ronaldo Lopes 453 -
1
votes1
answer195
viewsFilter Json Using C#
I have this script in c# that makes me recover a token from an external api to mine that I am developing. Until then, I managed to recover without problems the parameters of this api (the token is…
-
1
votes0
answers72
viewsHow to handle an Exception of an http Request in Asp Net MVC
Hi, I have an app on ASP.net MVC who’s making a requisition http through a connection port that is available through a service, which is running on the server. The controller calls the method and…
-
1
votes1
answer214
viewsField validation problem in ASP.NET Core
The field Unit Value accepts only 3 digits after the comma. I need it to accept 4 decimal places. I wonder what might be causing this restriction regarding the formatting of this field. The code I…
-
1
votes1
answer281
viewsHow to use Bindproperty in variables where names are dynamic in . net-core Razor pages
In Asp.net core Razor pages to pass data from a form declared as follows: [BindProperty] public int NMembro1 { get; set; } Where on the form side the tag input is stated as follows: <input…
-
1
votes0
answers39
viewsIs there a limit to subclass levels to use the Where function for query?
I am working on an internal statistical data system of my company and I came across a situation I had never seen before. I am consulting the API of a service and this returns me a JSON with many…
-
1
votes0
answers1254
viewsNo errors appear in Vscode (eg errors referencing wrong typed)
I’ve looked at everything I had and I haven’t got it yet... I am studying ASP.NET Core, with C#, and no errors appear in Visual Studio Code. Example: if I reference a class with the wrong name, it…
-
1
votes2
answers331
viewsWhat should I return in an Httppost and Httpput in an API?
I am doing an API in . NET Core and I have a question in what I should return in the methods Httppost and Httput, as below: // POST: api/Product [HttpPost] public async Task<IActionResult>…
-
1
votes1
answer64
viewsProblems using null coalescing
I’m having trouble using the null coalescing in the case below: When trying to use operand ?? to validate if the value reader["Data"] is void, and if the DateTime.MinValue. The error that returns…
c# asp.net-mvc asp.net-mvc-5 asp.net-core datetimeasked 4 years, 10 months ago Demetrius Pecoraro 36 -
1
votes2
answers1062
viewsAdd-Migration does not work on EF Core 3
good afternoon. When trying to generate an initial Migration to create the database structure, I get the following error: "Unable to create an Object of type 'Meudbcontext'. For the Different…
c# visual-studio asp.net-core entity-framework-core migrationsasked 4 years, 10 months ago Marcos Reis 21 -
1
votes1
answer136
viewsEntity Framework Core relationship creation one to Many
public class Evento { public int Id { get; set; } public string Nome { get; set; } public Categoria Categoria { get; set; } public CasaShow CasaShow { get; set; } public float QuantDeIngressos {…
-
1
votes0
answers269
viewsHow to read variables from ASP.Net Core Multiple Environments?
I’m trying to read from the properties appsettings file with different values, one for each environment. My files are as follows, appsettings.json, appsettings.Development.json,…
-
1
votes1
answer194
viewsReturn some query columns using LINQ
I have a query that returns me all the columns and I’m using only two columns (id and nome) in my select2, I thought to bring only these columns, I wonder if it is possible to bring in the query…
-
1
votes0
answers15
viewsHow to correctly implement a System.Threading.Monitor in . net core
I have a piece of code that implements a Monitor. The purpose of this code is not to allow another thread to write in the log while one of them is running. This code works perfectly in . net…
-
1
votes1
answer141
viewsHow to make a Soap call on . Net Core
I am trying to consume an external service that receives an xml Soap, but always returns error 500 (Internal server error). But if I test via SOAPUI works normally. I have tested several types of…
-
1
votes1
answer30
viewsError trying to get client IP address in ASP.NET CORE 3.0
I am searching a way to get the IP of the logged-in user did the installation of: Microsoft.AspNetCore.HttpOverrides 2.2.0 In Startup I added in Configure : app.UseForwardedHeaders(new…
asp.net-coreasked 4 years, 5 months ago Harry 3,805 -
1
votes1
answer242
viewsChange SDK version 3.1 to 2.1
I made all my ASPNET Core API 3.1 but when I went to configure the CICD, Nuget Restore accuses version error... Speaking I have to use a version 2.1 or lower. (error to follow) '##[error]The nuget…
-
1
votes0
answers60
viewsGood Practices and Use of Datetime in Viewmodels List
I’m making a system for the client, and he dismissed the use of fullcalendar, which would be practical. With this, I created in a table with the fields Agendaid(int), and Scheduling(Datetime) years…
-
1
votes1
answer46
viewsField with Datetime format does not change the format to Date - Asp.net MVC
I need to show only the date format in a Datetime field, but only letters are appearing in the field (even if the value property contains a date). VIEWMODEL: [DisplayFormat(ApplyFormatInEditMode =…
-
1
votes1
answer32
viewsOn which project layer with DDD concept, should I create a function or routine for the reorganization of portions of a receivable?
I have an Asp.Net Core MVC project in which I am developing an Accounts Receivable. The whole project uses the DDD concept. I need to create a function to reorder the sequence of parcel records in…
-
1
votes1
answer364
viewsUsing jquery field mask in ASP.net Core MVC
I am working on a CRM project with C# Asp.net core with Mysql and I am already with bank ready and everything straight and I made the client registration form and I am in the validation part now. I…
-
1
votes1
answer101
viewsHow to persist extended Identity(Authentication) fields. net CORE 5.0
I have a project in ASP.NET MVC CORE 5.0 . What I want to do: Retrieve the information dadAleatorio user logged in, in any controller to insert them in wheres and creates. For example I want to…
asp.net-mvc asp.net-core login asp.net-identity database-firstasked 3 years, 11 months ago Jabrel 49 -
1
votes1
answer96
viewsRun unit test with memory database and fromsqlraw is giving error
I’m trying to build a unit test with . Net Core 3.1 and using Xunit. It turns out I still don’t have a database and so I use the UseInMemoryDatabase. Turns out when I make the call from PROC, I get…
-
1
votes1
answer74
viewsCors error in application dotnet core + React web app
I have an application problem that when I send files via POST and the image is larger in Mb Cors error occurs, images of a few kb work normally. Dotnet core api In the api I already added Cors and…
-
1
votes1
answer18
viewsProblems getting a Viewmodel with decimal values using Ajax
When you Get using Ajax, viewModel is coming to the Controller with the fields reset. I’m creating the class manually, converting it and doing the GET. I cannot figure out the reason for the…
-
1
votes0
answers49
viewsRelationship 1-1 and circular reference
I’m running a very simple test, where I have two entities with a 1-1 relationship between them: public class User { public int Id { get; set; } public string FirstName { get; set; } public string…
-
1
votes2
answers37
viewsEntity Framework -> How to find the largest table elements
I have the following tables in my base: Produto Id | Nome | Preco 1 | fone | 100 2 | copo | 50 3 | pao | 10 ProdutoStatus IdProduto | Versao | Preco 1 | 1 | 101 1 | 2 | 110 1 | 3 | 90 2 | 1 | 55 2 |…
sql-server .net entity-framework asp.net-core entity-framework-6asked 3 years, 9 months ago Guilherme Golfetto 743 -
1
votes1
answer38
viewsHow to use Async/Await Asp . Net Core correctly
I am using asynchronous requests in various parts of the project, but a doubt has arisen because I know that for a method to be asynchronous it is necessary the same being async and have a await.…
-
1
votes1
answer252
viewsError deserializing Json . NET CORE 5 - Jsonexception: A possible Object Cycle was Detected
I basically created an API project on. NET 5. My idea is to consume their API (Take repository information), and then make some information available in my API. The request is successful but there…