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
answer785
viewsOpen partial view by passing parameter
I am doing some tests on ASP . NET CORE 2.0 and I have the following question. I have an Index (View) that is displaying a list of `Users`. And from the click of a button `Edit`, I rewrite my…
-
1
votes1
answer437
viewsLoad table via AJAX
I’m trying to load the data from a table, via ajax, this way: function buscaFornecedores(id) { var url = "/Produto/BuscaFornecedor"; $.ajax({ url: url, type: 'GET', data: { id: id}, success:…
-
1
votes1
answer231
viewsHow to display Modelstate errors when POST is done by AJAX?
Hi, I’m developing an Asp.net core 2.0 application. I have a div with Asp-validation-Summary for displaying model errors. follow: <div asp-validation-summary="All" class="validation-summary alert…
-
1
votes0
answers38
viewsProblem accessing the Controller
Apicontroller [Produces("application/json")] [Route("api/[controller]")] public class ClienteController : Controller { private IClienteRepository _ClienteRepository; public…
-
1
votes1
answer118
viewsMap a table and enable Auto-increment of a FK field in Postgre using EF Core and Fluent Api
I am unable to activate the Auto_increment of the Contactotype field in Postgre. In the table mapping I specified the "Valuegeneratedonadd" resource, but when I update the database with Migrations,…
entity-framework asp.net-core migrations fluent-api entity-framework-coreasked 6 years, 3 months ago Master JR 1,853 -
1
votes1
answer56
viewsC# - EF Core doubts to create relational model
I am starting in Asp Net Core and have the following question: I own a model Curso and a model Unidade, a course has several units and that unit may belong to more than one course. I made the…
-
1
votes0
answers54
views"Could not parse Expression '...: The Given Arguments Did not match the expected Arguments"
I am using the Compiledqueries Feature of the framewok core 2.0 Entity but Even though it does not Give syntax error, when the program is running, I get this Exception: Could not parse Expression…
c# asp.net asp.net-core entity-framework-core .net-coreasked 6 years, 2 months ago Samuel Silva De Carvalho 11 -
1
votes0
answers51
viewsmvc HTTP 404 error
Good, I created an ASP:NET WEB Core 2.0 Appl project. I created views and controllers. When I do a Ubmit via: <form asp-controller="Audit" asp-action="Search" method="post"> Instead of opening…
-
1
votes1
answer862
viewsHow to sign NF-e XML in ASP.NET Core using NF-e 4.00 signature standards?
I am developing an API with ASP.NET Core, communicating with Sefaz to send NF-and, however I am having a problem signing XML, below is the code that makes the signature: var listas =…
-
1
votes1
answer189
viewsHow do I pass a View value to the Controller in Asp.net core?
I want to go from View <table style="width:100%"> <tr> <th>Serviço</th> <th>Data</th> <th>Feito</th> </tr> @{ foreach (var item in…
-
1
votes0
answers31
viewsSave photo in MVC
I’m trying to save photo in the database by following this link, but it’s not working. Here is the HTML code: <div class="form-group"> <label asp-for="Foto"…
-
1
votes1
answer1719
viewsInconsistent accessibility: "value" parameter type is less accessible than "value" method
Inconsistent accessibility: "Iclientmanager" parameter type is less accessible than "Clientecontroller.Clientcontroller(Iclientmanager, Usermanager) Controller: public class ClientController :…
-
1
votes1
answer55
viewsChange /controller? id=1 URL to /controller/1
In my view I have two buttons that pass parameters via GET to my controller index, the problem is that the URL does not stick to the traditional ? id=1 and I wanted to make it look like this:…
-
1
votes1
answer222
viewsMigration does not recognize Context
I’m developing an application using DDD architecture. In my Infra layer, I have my data models, all based on Code First. I’m using the SQL as database. I have installed everything that was needed.…
-
1
votes1
answer86
views"Jsonresult" does not contain a constructor that accepts 0 arguments
I am trying to return a Jsonresult to my View, but it is returning the following error. "Jsonresult" does not contain a constructor that accepts 0 arguments You could help me friends ? [HttpGet]…
-
1
votes2
answers1938
viewsGET service - System.Nullreferenceexception: 'Object Reference not set to an instance of an Object. '
I am acting in the creation of a service Get in ASP.NET Core, my project contains the following structure: Certidao.Data - Class Library Inside there is Dependences, Models: Sexo.cs and…
c# .net entity-framework asp.net-core nullpointerexceptionasked 6 years, 1 month ago Leandro Azevedo 303 -
1
votes2
answers209
viewsAdd subitems between groups with Linnus
How can I perform calculations between subsets of a group by query in English? Follow example: Consulta Linq var listPlanoDeContas = (from t in _planoDeContasRepository.GetAll() orderby t.Month…
-
1
votes1
answer645
viewsCreate Dropdownlist with Viewbag
I’m getting the following error: Invalidoperationexception: There is no Viewdata item of type 'Ienumerable' that has the key 'Office'. Here I search from the database: public…
-
1
votes0
answers100
viewsUse 2 models in a View, but separate them in the form submission
I’m getting the following error: 'Addemployeeviewmodel' does not contain a Definition for 'Officeemployee' and no Extension method 'Officeemployee' Accepting a first argument of type…
-
1
votes1
answer192
viewsSave XML without formatting
I need to generate the xml, but without skipping line, the way I Gero he is all identado, as I do to save without skipping the line? document.LoadXml(soapEnvelope); document.Save(@"E:\nota.xml"); I…
-
1
votes1
answer758
viewsIgnore files when uploading to repository
I have a . net core project in bitbucket and I use visual studio 2017 to do the operations next to the repository. The problem is that even without me having made any changes to the project, when I…
-
1
votes0
answers112
viewsHow to use more than 1 'div Asp-validation-Summary' in the same Razor view?
I have a Razor view that has two different forms, one of Login and the other of User Registration, I built both forms and I inserted as usual the tag with asp-validation-summary <div…
-
1
votes0
answers64
viewsI am unable to validate the authenticated user
PROBLEM: I am unable to validate the user authenticated by the database. What happens is that when I run my application, putting valid user and password, it returns me false inside my loginOk…
-
1
votes0
answers46
viewsHow to fill a property (type Object) from a form
I have the following code @model ModelTransaction <div class="form-group"> <label for="name">Conta:</label> <select asp-for="Account" class="form-control"> @{ foreach…
-
1
votes2
answers63
viewsProblem Trying to query Application c# + Database
I’m making a list of customers, but is returning this error: System.Argumentexception: 'Column 'Cpf_cpnj' does not Belong to table .' This column, Cpf_Cnpj, is in my database: I can’t solve this…
-
1
votes1
answer1105
viewsProblem Injecting a Service into the Controller: An unhandled Exception occurred while Processing the request
I’m getting error below when trying to inject a service into a controler. I already checked my configuration on Statup.Cs. Error: An unhandled Exception occurred while Processing the request.…
-
1
votes1
answer79
viewsHow to clear a Modelstate error with specific property?
I created Asp.net mvc core 2.2 project with individual account. Follows code: [BindProperty] public InputModel Input { get; set; } public class InputModel { [Required(ErrorMessage = "O campo…
-
1
votes1
answer449
viewsCreating a modal with delete function . Net Core 2.0
Good evening, I would like help on a question of . Net Core 2.0, how can I create a modal of boostrap 4 with the delete function in the code below? My main problem is on how to recover and make the…
-
1
votes1
answer478
viewsHow to place routes with optional parameters Asp.net-core
I wish my route was this way [HttpGet("APIPassword={APIPassword}/AvatarUUID={AvatarUUID}/Idioma?={Idioma}")] Where Language is Optional…
-
1
votes2
answers294
viewsHttpinterceptor null token (Angular 7)
Hello! Time to "pick up" the token on Httpinterceptor is coming as null. follow code d Interceptor: import { Injectable } from '@angular/core'; import { HttpRequest, HttpHandler, HttpEvent,…
-
1
votes1
answer379
viewsHow to "read" return messages ASP.NET CORE WEB API
I see here numerous questions about how to create custom feedback in a WEB API using ASP.NET Core. My question, besides this is the client side, how this message can be read in the application that…
-
1
votes1
answer383
viewsModal to delete Registry (.net core - javascript - Bootstrap)
I’m trying to use modal to delete a record from a table. By clicking on the delete button, I wanted to display a modal asking for confirmation for exclusion, so far so good, I was able to do, but go…
-
1
votes1
answer644
viewsHow to pass a parameter through the URL using Httpget in ASP.NET CORE?
I have an application in ASP.NET CORE 2.0 where I did the following method in the controller [HttpGet] public IActionResult Index(int idLeilao) { ConsultaCarrosModel obj = new ConsultaCarrosModel();…
-
1
votes1
answer1061
viewsChange <span> text with jQuery+variable
I’m trying to change the text displayed by a span within a modal: <div class="modal-body">Deseja realmente excluir?<span id="nomecliente"></span></div> I’m using onclick to…
-
1
votes1
answer243
viewsProblems passing 3 parameters via AJAX request -Asp.net Core MVC
I need to pass 3 parameters to my controller, but the values are not enough: Personal Contact Personal Modelcontact Contact Information: Complex parameter (class with properties); int…
-
1
votes0
answers119
viewsCheck if any user has logged in, and pick up the logged in user - core 2.1
Hello I need to check if there is any user authentication, and after checking if any user has authenticated to get this user’s ID. I own a Middleware that redirects the user to condominium…
-
1
votes1
answer272
viewsCheck if the user has authenticated, and get authenticated user information
I want to check if you had any user authentication, and after checking if any user authenticated to get that user’s ID. I have a Middleware that will redirect the user to condominium registration…
-
1
votes1
answer83
viewsDependency injection and coupling - how wrong is this?
I created a project where the intention was to have a simple architecture, a rich domain and a webApi, but as soon as I started and already seeing the cagad*s, this is very bad? So come on, I…
c# asp.net-core pattern-design software-architecture dddasked 5 years, 7 months ago Márcio Sebastião 769 -
1
votes1
answer112
viewsError 404 run angular Asp.net core
I am doing a project integrating the angular with Asp.net core, but as soon as I installed the angular and configured on the page this presenting error 404, even reviewing all the paths made by…
-
1
votes1
answer75
viewsVisual Studio not respecting ASP.NET Core Templates
I have a project ASP.NET Core 2.2 And within the project I have the Templates folder that has my Custom Scanfolding, for some reason it stopped working, I used it a lot. Today after several updates…
-
1
votes1
answer317
viewsInstances of Singleton Asp.Net Core classes
I have a doubt in the following situation: Singleton Classe namespace TesteSingleton { public class Singleton { private Singleton _singleton; public Singleton() { if (_singleton == null) _singleton…
-
1
votes0
answers48
viewsUpload file to Asp.net core by fetch
I’m editing the previous question. This function traverses a table with input file and plays in a formData but sent by fetch at the asp.net core is coming null function uploadFiles() { let…
-
1
votes1
answer83
viewsList for logical deletion
I have a question about who’s responsible (back or front) in my case, I have a list on front which is sent to the backend save or inactivate the record: [{ idTabela: 2, codKit: "kitCopleto",…
-
1
votes0
answers62
viewsHow to open the same Modal Bootstrap window (cascaded) several times with different contents?
I am a layman in web programming and I am working with bootstrap modals windows in an Asp.net MVC project. I come from the Desktop world and I confess that I am having difficulties with the…
javascript asp.net-mvc twitter-bootstrap asp.net-core modalasked 5 years, 6 months ago Master JR 1,853 -
1
votes0
answers160
viewsReturn list with Ajax post method
Good afternoon to all, I have a problem which is as follows. Through an Ajax request I return a list of objects. This class of mine is just to load the data I need to send to the view that makes the…
-
1
votes1
answer180
viewsMake Distinct Entity Framework
I’m trying to accomplish the Distinct, in my model of Phones, but none of the options I’m trying to make work. Could tell me what I’m doing wrong ? Below I described several ways I have tried to do,…
-
1
votes4
answers243
viewsProblems saving an already edited entity in the Entity framework core context
Hello I’m working with Asp net core my project follows DDD architecture, I’m having error with Entity Frameworks Core, when saving an altered entity, ie I load it in the frontend I change a property…
-
1
votes1
answer1618
viewsHow to submit a post request with files and json?
I have a form to send data to my server. In this form I have some input fields and a file upload. This is the sending of my form. submit () { console.log(this.banners) const banners = new FormData()…
-
1
votes3
answers132
viewsChoose Modal from variable
I am giving the value to a variable string in my index.Cs file and then I am taking the value to use in Typescript, however I am creating another page besides index now and is giving error when I…
-
1
votes1
answer164
viewsInjection error of dependency
I’m using Xunit to carry out my tests, I am trying to access my CampeonatosController, consequently I have to pass the value shown in the image below as parameter, but I am getting the error below.…