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
-
3
votes1
answer496
viewsRequest arrives null on C#
I have a request that’s being made this way at angle 5. enviarEmail(titulo: TitulosCobranca, unidade: UnidadeEmpresa) { let param: any = { titulo: titulo, unidade: unidade } return…
-
3
votes2
answers234
viewsHow can I get the Insert in log with logged in user ? Identity - Asp.net core 2.0
I need to get the logged-in user to log in, thus including which user included in the table, made changes, and delete. I’m learning the language, and I still have many doubts. This is my…
asp.net-mvc entity-framework asp.net-core asp.net-identityasked 6 years, 4 months ago Mariana 2,512 -
3
votes1
answer555
viewsASP.NET Core Pagination - Pagedlist.Core
I am creating an ASP.NET core study project, and when using the paging library PagedList.Core, the following error is occurring while running the command dotnet run: Startup.Cs(49,35): error CS0246:…
-
3
votes1
answer182
viewsIndividual and Legal in the same table
Could you help me please ? I am developing a crud for client, where I will leave physical and legal person in the same table, but in case when the user chooses the type of person through a radio…
-
3
votes2
answers900
viewsError while trying to add session to startup
I have a problem, always when I will compile the solution this giving error: System.Invalidoperationexception: 'Unable to resolve service for type 'Microsoft.AspNetCore.Session.Isessionstore' while…
c# asp.net-mvc asp.net-core visual-studio-2015 dotnet-cliasked 5 years, 10 months ago Thiago Corrêa 119 -
3
votes1
answer77
viewsHow to redeem data that was saved in the bank during a creation process
In some Orms Nodejs I have this feature. However, I would like to know how to rescue an entity that was persisted in the bank? For example: User has an attribute ID. If I return the item, the ID…
c# entity-framework asp.net-core entity-framework-coreasked 5 years, 10 months ago Thiago Cunha 1,356 -
3
votes1
answer248
viewsRecord Email and Phone Array in Database with Entity
I need to save an html array of telefones and Emails, in the database, but I’m not sure how to receive such data. Phone and email number can be 0 ou N, as in the image below, one can add as many…
c# asp.net-mvc-5 asp.net-core entity-framework-core .net-coreasked 5 years, 7 months ago Matheus 616 -
3
votes1
answer62
viewsDoubt with Viewdata using Asp.net core 2
I made an example for testing using Viewdata, apparently it should work, but it is generating me a reference error, as message below. The type or namespace name 'Student' could not be found I made a…
-
3
votes1
answer94
viewsGrouping of values
I have an application that generates the following results: I would like to know how I can arrange the object in only 1 line, say have only one date, and within the date have the schedules, to have…
-
3
votes1
answer82
viewsMake if in an HTML tag to add or not attribute "checked"
I’m developing with the .Net Core Razor and I’m setting a string in my GET and I need that, according to what this string (in the case of "true" or "false"), checkbox whether or not marked. To…
-
3
votes1
answer83
viewsCounting amount of results of a Split()
I have a string that looks like this: Yeah, No, Maybe And I have a code that I need to put these string results separately into a <option> of a <select>. I intend to do this through a…
-
3
votes1
answer102
viewsCORS blocking . netCore 3
Good morning, I created an API on. netCore 3 and I did all the tests enabling CORS and with POSTMAN I had no problems, but when trying to access API from another computer, I am being blocked by…
-
3
votes3
answers126
viewsString to date.parse Javascript conversion problem
I’m getting in a date value variable on string and making the conversion to date, to be able to make a condition. The problem is that when the date comes as 31/12, the variable gets NaN. Follow the…
-
2
votes1
answer311
viewsInstall ASP.NET 5 on Linux
I read some news that it is possible to install ASP.NET 5 on Linux. Would someone please have a nice tutorial that could help me with this? I would like to install on Ubuntu.
-
2
votes1
answer183
viewsRun program in certain folder in IIS
I would like to know how to run an exe or jar program in a certain IIS folder, through the code c# . net core. It would have to be a synchronous call, that is when c# performs the call from the jar…
-
2
votes0
answers1115
viewsAsp.Net MVC 5 vs Asp.Net MVC Core?
I see many talking about Asp.net Core. Is it worth migrating MVC5 to Core ? Or should I continue with MVC5?
-
2
votes1
answer819
viewsDate validation in the Asp Net Core model?
I have a model and wanted to validate the final date (which should be equal to or greater the initial date) public class MyModel { [Key] public int ModelId { get; set; } [Display(Name = "Início")]…
-
2
votes1
answer858
viewsError using Tempdata in ASP.NET 5: Session has not been configured for this application or request
I need to use the TempData but gives the following error in Runtime: InvalidOperationException: Session has not been configured for this application or request. em…
-
2
votes1
answer82
viewsErrors with version . NET Core
I have an error in the .NET. I have already installed the . NET Core 1.1.2 and . NET Core 2.0.0, but I have this error and I cannot solve it. Error: It was not possible to find any compatible…
asp.net-coreasked 7 years, 3 months ago Marquin Ferreira 362 -
2
votes1
answer835
viewsUpload images to Asp net core 1.0
Oh guys I’m having a doubt I’m new in the . net, I learned in a course in Asp net mvc 5 so I would need to take that upload code and turn to Asp net core if you can help I am grateful. [HttpPost]…
-
2
votes1
answer324
viewsParameters between pages (ASP.NET Core / C#)
Hello, I have a question in which I already researched a lot and did not get any concrete answer. I am beginner in C# and ASP.NET, forgive me for ignorance. I have a project in ASP.NET Core MVC. On…
-
2
votes1
answer1034
viewsConnection to ASP.NET CORE 2 database
I’m starting with Asp.net, but specifically Asp.net core 2. I’m reading the documentation contained in Docs.microsoft.com. However, I have a question. How do I connect to a DB? In PHP I use PDO, but…
-
2
votes1
answer31
viewsConvert value to display in table - mvc Asp-net.core
I have a table that brings me a value in int and I need to convert this value to time, as I can perform this procedure, in case I would need to create a function to show me the correct value.…
-
2
votes1
answer664
viewsHow to deploy an Asp.Net Core Web API project to IIS?
Hello, I’m trying to put my application ASP.NET WEB API on the IIS of the Windows Server 2016 server, but without success. When accessing url ex: http://localhost:8080 returns this error: HTTP Error…
-
2
votes2
answers636
viewsError creating ASP.Net Core 2.0 database - Keyword not supported: 'initial Catalog
Hello, I am trying to create a database with SQL Server using the Entity Framework Core, but this presenting the following error: Keyword not supported: 'initial Catalog'. Does anyone know what it…
-
2
votes2
answers298
viewsEF Core Relationships one-to-Many-to-Many Fluentapi
Good afternoon, I’d like to take a relationship question from Entity Core. I have a table person and the person has a position (Manager, supervisor, responsible, etc..) public class Pessoa { public…
-
2
votes1
answer153
viewsIf inside the button
I have this "Receive" button, and this checkbox that when it is marked, means that the account is paid: I need that when he clicks the Receive button, and the checkbox is already checked, that he…
-
2
votes1
answer106
viewsWhat is the purpose of the "[Bind("ID,Title,Releasedate,Genre,Price")]" feature in a method?
I am creating a project in ASP.NET Core MVC for learning purposes. In a certain part of the Microsoft guide when the technique of scaffold to generate the controller and the views corresponding to…
-
2
votes1
answer1117
viewsProjects with synchronous and asynchronous Apis
I am developing a small project and have, for now, two entities: Product and Customer Product API is asynchronous (with Task and async) and client API is synchronous. I would like to know if there…
-
2
votes2
answers1783
viewsX.PagedList.Mvc with Core and Bootstrap 4.0
How to use the X.PagedList.Mvc with Core and Bootstrap 4.0, and thus create a full automatic pagination.
-
2
votes1
answer1785
viewsUrl encryption
I have a way of Email which generates a link through HTTP request, which will send to the user’s email for exchange. But for testing I fixed in this URL the user ID, but for security reasons I have…
-
2
votes1
answer62
viewsAsp.Net Core does not support System.Data.Entity.Spatial.Dbgeography?
Follows the project’s created property Asp.Net: public System.Data.Entity.Spatial.DbGeography Geo { get; set; } How can I do this in design Asp.Net Core 2.2 ?…
-
2
votes2
answers108
viewsCheck if call came from API (.Net Core) or MVC
I have some applications that need to share the same Repository (Class Library). The Repository project is created and working, with MVC applications. The problem is that it searches for the…
-
2
votes0
answers24
viewsHow to use JWT Bearer as authentication for Apis and Identity to authenticate MVC pages in the same project
Is it possible in the same project to have an API with JWT Bearer-protected endpoints and Identity-protected MVC web pages? I already have MVC working perfectly with Identity, but when I enable JWT…
asp.net-coreasked 5 years, 6 months ago Emerson Caus 29 -
2
votes2
answers1139
viewsGet Solution Folder C#
I have a solution with 4 projects inside. In my controller I need to open an HTML that is inside another project, but I can’t open the file folder. Below follows print with my structure: The class…
-
2
votes1
answer503
viewsData return Json
I have this function to return the data in JSON, but I’m not able to make it work in MVC Core. public ActionResult SalvarItens(string HoraInicio, string HoraFim, bool Seg, bool Ter, bool Qua, bool…
-
2
votes2
answers1868
viewsGrab URL and skip to the next page
I have tried several ways, I need to take the value of the current URL, and move to the next page, so that after the action of the create is completed, I go back to the URL that was passed, how can…
-
2
votes2
answers684
viewsPass JSON.stringify to Controller
I am trying to pass a table via JSON.stringify, in ajax, is receiving the data perfectly, but I cannot pass to the controller. I’m passing that way: function enviarDados(produtos) { $.ajax({ method:…
-
2
votes1
answer105
viewsInclude in Entity Framework from an Enumerable
I have the following entities: public class Rota { public Rota() { CidadesRotas = new List<CidadesRota>(); } public int RotaId { get; set; } public string Descricao { get; set; } public string…
-
2
votes1
answer116
viewsSave Phone Array to Database
I created a table of Clientes and two from customers who are ClientesTelefone and ClientesEmail in my form I am generating email fields and phone dynamically, so I would like to know how I can…
-
2
votes0
answers74
viewsModel not being fully validated
Good morning Guys, I’m testing an application to add a client, but whenever I try to add the user, test the Viewmodel to see if the information is consistent, but the program does not validate all…
-
2
votes2
answers86
viewsLimit index query but not combo query
Good afternoon, In the company’s ERP we have a query in the Index that is limited to 80 records. The problem is that in create we have combos that bring more than 150 records and is also limiting to…
-
2
votes1
answer1998
viewsDependency Injection - Error: Invalidoperationexception: Unable to resolve service for type
Friends, once again I come to you for help. When trying to call an Action from my Controller I am getting the problem described below: An unhandled Exception occurred while Processing the request.…
-
2
votes2
answers679
viewsHow to pass a parameter from one Action to another Action in the same Controller
I need to send a parameter from one action to another action in the same controller, but the parameter is "reset". How can I do this? Down with the code I’m making: [Authorize] public class…
-
2
votes1
answer83
viewsJoin to Linq c#
I have the following query in Sql Sevrer SELECT PT.id, P.nome AS Codigo, PT.topologiaid, TE.id AS TipoEntidadeId FROM [dbo].[propriedade] P INNER JOIN [dbo].[propriedadetopologia] PT ON P.id =…
-
2
votes1
answer772
viewsPaging library for . Net Core
I’ve worked on some frameworks like Spring and Nestjs, and there I worked with a library that listed a query page. Here at . Net Core, I have to create a method to work with it. For example: public…
-
2
votes1
answer363
viewsHow to get user logged in to the view?
I need to get the user who is logged in to my application, I did the example below but it does not work. On my Nav tag I used the import Asp.net core and @inject <nav class="site-menu ">…
-
2
votes2
answers177
viewsConverting (Mapping) a List of an entity to another reference explitically
How do I convert/map a list from one entity to another reference explicitly. Here’s an example I was able to perform with an entity: public static explicit operator UserResponse(Entities.User…
-
2
votes2
answers79
viewsDetecting if a Setter of a property has been called
Hello I wonder if there is a way to find out if the value of a property has changed. Example public partial class MinhaClasseExemplo { public int Id { get; set; } public String Nome { get; set; }…
-
2
votes0
answers77
viewsProblem running a function in Asp.net.core.webapi + postgresql + npgsql+Dapper
I have a Webapi in Asp.net core, using postgresql as a database. Inside postgresql, I have the following function: CREATE OR REPLACE FUNCTION evento_distancia( IN lat numeric, IN lng numeric, IN…
postgresql asp.net-web-api asp.net-core dapper npgsqlasked 5 years, 8 months ago Thiago Oliveira 147