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
-
0
votes0
answers129
viewsGet User Entity ID
I’m trying to get the user id and save in the table, here’s how I referenced in the Foreignkey table: public string FuncionarioId { get; set; } [ForeignKey("FuncionarioId")] public virtual…
-
0
votes1
answer59
viewsIs CQRS login in Command or Query?
Hello, I will do Login in hand (would not use Identity or any other lib or service) I am using CQRS, I wonder if I should put the Login as Command or as Query, given that there will only be a logic…
-
0
votes0
answers57
viewsIdentity ASP.NET Core, error "Cannot create a Dbset for 'Usuario' because this type is not included in the model for the context"
I’m starting to learn Asp.Net Core, and I’m trying a problem regarding a user registration, because when I try to create it returns an internal error with the message "Cannot create a Dbset for…
-
0
votes1
answer108
viewsHow to pass a string as a parameter in Action
I need to pass as a parameter a string where it returns all items that have the same name. Here he is returning Null. With Id it works perfectly. [HttpGet, ActionName("Search")] public async…
-
0
votes1
answer115
viewsImage file encryption with c#
Hello. I receive an array of bytes containing the image. I need to record this image in an encrypted file and not the encrypted content and save it to directory. How to do this directly without…
-
0
votes1
answer262
viewsConsume via Jquery-Ajax, an API on localhost:28033, from a page on localhost:7545
I’m trying to do one thing, but it’s not working. I have two projects . Net Core 2.0 , an API, and an MVC. I want to run ajax calls from the MVC project, to API project controllers. I open two…
-
0
votes1
answer56
viewsView data on a C# ASP.NET search screen
Bring information to the View() Everybody, good afternoon. I have the following difficulty: I have a search screen of a Helpdesk and I need to display the database data, which is a list of calls,…
-
0
votes1
answer24
viewsAzure Webapp VS Azure Function
What are the biggest differences between webapp and Function? At first, I know that webapp supports higher amounts of data than funtion, and that Function has other forms of activation like Queue,…
-
0
votes1
answer213
viewsREST API Consulting another API
I need to make a REST API, which would query data from a cloud API, and return in the app in json format, but even with a lot of research, I didn’t find anything like it, I just wanted to know how I…
-
0
votes0
answers28
viewsDebug webhook (.net core) method
How can I debug the code of a method intended to receive an event through webhook? The communication is taking place without problem, because through the application ngrok, I can identify the…
-
0
votes1
answer69
viewsProblem with Razor
I have a problem I haven’t been able to identify what you’re causing. When trying to enter the Log View, an "Inter-Ternal Server Error" occurs and the message appears below. I am using ASP.NET Core…
-
0
votes0
answers38
viewsNot getting the correct core.net User Id
I’m using ASP.NET CORE 2.0, and I need to get the logged in user id. This is my Account Controller: [Route("[controller]/[action]")] public class AccountController : Controller { private readonly…
-
0
votes0
answers231
viewsGenerate Boleto with Boletonetcore - C#
Friends, I’m trying to generate boleto with the Boletonetcore I’m trying to run the test Bancoitaucarteira109tests.cs. I created a project, inserted the files, but I’m not sure how to run it. I…
-
0
votes1
answer118
viewsHow to leave parameter optional, API Asp.net core
I have a question on how to leave optional parameters in the method call in the API. I have the following method: [HttpGet("{aplicativoId}/{moduloId}/{taxaId}/{musicaId}/{produtoId}")]…
-
0
votes2
answers23
viewshow to validate date field for if nothing is passed see the current date
I have an endpoint as follows: [HttpGet] [ProducesResponseType(typeof(IEnumerable<TestsDto>), (int)HttpStatusCode.OK)] public async Task<ActionResult<IEnumerable<TestsDto>>>…
-
0
votes1
answer27
viewsSearch for several API ids. net core
I do not know whether I was clear in the name however I have a doubt, I possess a route as follows: /api/produto/v1/Aplicacao/filter where this endpoint is a GET that passes a word as parameter and…
-
0
votes0
answers31
viewsSession is null and void
I’m trying to set up a session, but it always gets null, look: public class AutenticacaoModel : PageModelBase { public void OnGet() { HttpContext.Session.SetString("Teste", "Quero ver esse valor");…
-
0
votes0
answers34
viewsThe option to create an ASP.NET Core web app does not give me the option to create an app with React
Good personal evening I’m having a "problem" in creating a new Web application ASP.NET Core. When I choose the . NET 5.0 option it does not appear that screen that has the option to create an app…
-
0
votes0
answers41
viewsASP.NET Core - Search by daughter entities
I need to implement an API that receives parameters for daughter entities Example: api/Orders/5/Products or api/Orders/5/Products/10. I need to pick up only the products of order number 5 or still,…
-
0
votes1
answer31
viewsStore information per logged-in user without using Session
I would like to know how I can store user information individually without using Constants and Session to be accessed by my data access project? It used constants but the application was transformed…
-
0
votes1
answer41
viewsASP NET Core Dynamic value "Route"
Can the route parameter be dynamic? for example I want that when Uf is "sp" I put sao-paulo, and so on with the other states. Because then when I load the aciton it loads the url as I reported it.…
-
0
votes0
answers10
viewsASP.NET Identity authentication in multiple applications
I currently have the following scenario. Two applications each with their database using Entity and Identity Core 2.2 My goal is to create a user center to unify the user table 'Aspnetusers' so that…
-
0
votes1
answer36
viewshow to validate for name not to receive numbers or special characters c#
How do I validate the name attribute where it does not allow numbers or special characters ? I did so but it’s not working [Required(ErrorMessage = "O campo nome é obrigatório!", AllowEmptyStrings =…
-
0
votes1
answer31
viewsDuplicate Username - Entity Framework
I am in an ongoing project, today has already been installed the Entity framework. But what happened, it doesn’t let add users with the same name, which makes no sense, since they can have equal…
-
0
votes0
answers10
viewsHow to convert a string attribute of a Model containing an XML (Danfe) to PDF (ASP.NET Core)?
I’m sorry if the question wasn’t specific enough, but I’m a beginner in ASP.NET Core. Long story short, I need to have an endpoint that returns a PDF file to the front end of the application, PDF…
-
0
votes0
answers851
viewsIDENTITY_INSERT is set to OFF - Entity Framework Core
I’m working on an application with Asp.net-core + Entity-framework-core and with mapping and configuration via Fluent-api. When I go into the bank I get the error that the IDENTITY_INSERT is defined…
sql-server asp.net-core fluent-api entity-framework-coreasked 6 years, 3 months ago Rafael Arthur 35 -
0
votes0
answers42
viewsAutomatic log out in Asp.Net Core
I’m using Identity in an ASP.NET CORE project, but I’m having problems uploading the project into production. When making a POST it sends my information normally, but when changing page and sending…
-
0
votes2
answers96
viewsChange a Generic Repository method to return with Asnotracking - EF Core
I have a generic repository, in particular the method GetbyId, in which I wish to change it to return a result with AsNoTracking or not as needed. How do I do this? My Interface: TEntity GetById(int…
-
0
votes1
answer1023
viewsUse Forms Authentication in an ASP.NET Core application
I’m migrating a website ASP.NET Web Forms (.NET Framework 4.7) to ASP.NET Core (but still using the . NET 4.7 as "target framework") - the goal is to use Razor Pages, dependency injection and other…
-
0
votes1
answer323
viewsHow to load viewmodel fields dynamically into Asp.net core mvc
I have a 1:N relationship between the Person and Contacts classes. In my Edit view, I receive a viewmodel containing a contact list. In my View, I’ve made a single for which you should scroll…
-
0
votes0
answers743
viewsWEB API 2 works on the localhost but not on the server
I’m starting with .NET Web Api 2 using .Net Core. In the Postman when I make the request on the localhost of my Webapi machine returns me a status 200 ok, but when I do on the server with the same…
-
0
votes1
answer71
viewsEntity Framework Core 2 - Recursive research into many-to-many relationships
I made a many-to-many relationship using EF Core 2, Code First method. Second seen at that link, it is necessary to create a Join entity: public class ClienteModel { public int ClienteId { get; set;…
entity-framework asp.net-core entity-framework-core .net-coreasked 6 years, 2 months ago Matheus Oliveira 51 -
0
votes1
answer1180
viewsCannot convert Implicitly
I’m getting the following error: Unable to convert from "Tclient" to "Easysistema.Models.Applicationclient" public class ClientManager<TClient> { private ApplicationDbContext _context; public…
-
0
votes1
answer175
viewsName property does not work using Razor Hiddenfor
I am creating several fields dynamically using Asp.net Razor and for this I am passing the index to a partial view and setting the name property of each field. Everything is working fine with all…
-
0
votes1
answer27
viewsInternal Server Error - Iauthentication
I am with the problem presented below and do not know how to solve, the system is complaining that can not access my class Iauthentication. follows below the error presented. Below my controller…
-
0
votes1
answer192
viewsProblems with Migration
I’m developing an application using DDD architecture. In my Infra layer, I have my data models, all based on Code First. I’m trying to use the Mysql as database. I have installed everything that was…
-
0
votes0
answers58
viewsUpdate of Telephone Array in the database
I’m trying to update information in my database where I have 1:N amid Clientes and Telefones, but I am not able to perform such update, because sometimes it will be necessary to remove a phone that…
-
0
votes0
answers41
viewsMigration does not run on EF Core 2.0
When Perform Add-Migration Init no message is shown and Migration is not performed and the prompt is in the state again PM> I checked that you are taking Entityframeworkcore.Tools 2.0.3 instead…
-
0
votes0
answers108
viewsTwo Viewmodels in one View
I have a problem, let’s explain: I have a page called Index where I re-address all the clientes from my database in a table, in this table there is a delete button that opens a Modal de Confirmação…
-
0
votes1
answer287
viewsWhen Generating PDF with Rotary viewPDF does not display - error 404 - Works Only Local
I’m trying to generate a PDF with Rotary, I can normally on Local, but when I publish it displays error 404. I’ve already added Dlls to the project. public IActionResult…
-
0
votes2
answers62
viewsRequest API not working on ASP.NET Core 2.1
I’m having trouble testing my end-points with the post and Asp.net core 2.1. Controller Base public class ControladorBase : Controller { protected IMapper _Mapper; public ControladorBase() { }…
-
0
votes1
answer234
viewsHow to Get Client-Side Data to the Server
Hello. I developed an application in . NET CORE and the access page will pick up the geolocation of the client with the coordinates of Longitude and Latitude. However, I made this code using…
-
0
votes1
answer289
viewsFunction jQuery return validation message instead of Alert
I have this function, which works perfectly: $('#FornecedorNovo').submit(function (e) { e.preventDefault(); var url = "/Fornecedor/VerificaInscricao"; var Insc = $("#InscricaoEstadual").val(); var…
-
0
votes0
answers97
viewsAdd deleted files when publishing ASP.NET Core
In my Asp.Net Core project I have some deleted files from the project. Only when I publish these files do not appear in the wwwroot folder of the project. <ItemGroup> <None…
-
0
votes1
answer268
viewsBinding a checkbox with Viewmodel without the use of Razor (Asp.net core MVC)
I’m having problems with Razor... I need to create a checkbox field and Binding with my viewModel using pure html. Only I’m not being able to do the Binding correctly with the bool property and even…
-
0
votes0
answers49
viewsLoad one tab into another
I have a layout page where I want to upload information to the notifications button. For this, I made an action in the controller to return a Partialview where a query will be made in the bd looking…
-
0
votes0
answers161
viewsGet value from an entity via navigation property
I have a question that seems basic, but I’m racking my brain to solve. How can I get the value of an entity attribute via Properties Navigations? For example, I have the classes: public class Budget…
-
0
votes1
answer17
viewsI need to get the value of Navigation Properties
Friends, how do I show in my View information through a navigation property, like: My View: <div class="panel-body"> <div class="table-responsive"> <table class="table table-striped…
-
0
votes1
answer54
viewsWhen the property is not int how to force Entity to create a field in the table as nullable:false
Migration is generating the name field in the table as nullable:true i don’t want it to be true, as I do to solve this problem? public class Professor { public string Id { get; set; } public string…
c# sql-server entity-framework asp.net-core entity-framework-coreasked 6 years ago Robson Junior 29 -
0
votes1
answer204
viewsControl Dapper Transaction with Simplecrud / Error: Enlisting in Ambient transactions is not supported
Good morning guys, all right? I need to control the Dapper transaction using Simplecrud. I have an application in Asp.net core using Dependency Injection. I will post parts of the code only…