Posts by Desalex • 455 points
33 posts
-
0
votes1
answer41
viewsQ: How to filter a List record within another list c#
I have a class of App where in that class contains a ICollection<Comentarios> Now I need to filter ALL comments who have Status == Aprovado, where this Status is an Enum. I tried to do it this…
-
-1
votes1
answer24
viewsQ: How to get the Keys values of a Keyvaluepair c#object?
I have a Json with the following structure: { "Data" { "Request": [ { "text": "Minha Pergunta?", "response": "Minha resposta" } ] } } I do as follows to receive the values in the code:…
-
-1
votes2
answers44
viewsQ: Improve select SQL Server performance
I have a table with 2 million records and I need to take 1000 by 1000, I know I can use TOP, but use the form below pq need to control the quantity, example: I get 1000 after the next 1000, then the…
-
0
votes0
answers47
viewsQ: Remove seat seats on the database side with Asp.net core Entity Framework
I have a method that I receive a string, does the search and returns all the data that is equal to the word I passed, like this: public async Task<List<ProductDto>> GetAllAsync(string…
-
1
votes1
answer33
viewsQ: How 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…
-
0
votes1
answer27
viewsQ: Search 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
votes1
answer42
viewsQ: How do I test the API gateway of a project in microservices
How do I test the Api gateway of a project in microservices? I configured Ocelot.json as below, and when I call in the browser /Billing get the bug:…
-
0
votes2
answers23
viewsQ: how 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
answer118
viewsQ: How 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
votes1
answer70
viewsQ: Write to new column of a csv file using Stringbuilder c#
I saw an example of code right here in stackoverflow where I use the example below to write a CSV file using stringbuilder: public void ExportarCsv(List<Result> erros) { string filename =…
-
0
votes1
answer31
viewsQ: Get html property value via jquery
How do I get property values data-pedido and data-id with jquery? <h5 class="titulo-resumo pedido" data-pedido="v583161rhp" data-id="01">Pedido</h5>…
-
-1
votes1
answer125
viewsQ: Return records according to percentage in sql server
Good night, I need to make a select that returns only the records that were paid more than 60% of the installments. I created a table with the following structure: CREATE TABLE PARCELAS( IDPARCELAS…
-
1
votes2
answers347
viewsQ: Ninject Not creating the Ninjectwebcommon class
I’m installing the package of ninject, but the class is not created Ninjectwebcommon automatically in the folder App_start. Does anyone have any solution? I am installing the version Ninject.MVC5.…
-
1
votes1
answer38
viewsQ: doubts generic class Asp.net mvc
Good night, In my project I have an application layer where the class is structured as follows: namespace ProjetoTreino.Aplicacao { public class PessoaAplicacao { private readonly…
-
-1
votes1
answer153
viewsQ: Doubt Interface Asp.net mvc
Good night, I have a doubt, I chose to work with Generica interface and my doubt is: Every entity needs to have an interface inheriting from the Generica interface ? Ex: public interface…
-
0
votes1
answer291
viewsQ: Connectionstring returning null
When trying to run my project is returned me the error: System.Nullreferenceexception: 'Object reference not set to an instance of an object.' I have a bank class with the manufacturer: public bd()…
-
1
votes0
answers249
viewsQ: Error connecting to database via Visual Studio
I am trying to add a database to my application, the first I got, however when trying to add another database is returned me the following error: A network-Related or instance-specific error…
-
1
votes2
answers706
viewsQ: Multiple error Object sets per type are not supported
I have a bug in my application. I am working with Identity for user authentication however when calling Controller created is returned me the following error: Multiple Object sets per type are not…
-
2
votes1
answer295
viewsQ: Jquery Datatable does not work
I created a table on my system using the jquery datatable library, but it is not working. At the end of the view I made the code declaration in javascript, but the style is not applied. Follows code…
-
1
votes1
answer158
viewsQ: Area Routes in ASP.NET MVC?
I’m working with areas but it’s not working the route and I created 2 areas, inside a created a folder called Cadastros and inside the other a folder called Tabelas. Cadastrosarearegistration.Cs…
-
0
votes0
answers192
viewsQ: sql related error
Good night, I am trying to register in my application, but is returning me the following error: Instance-specific or network error when connecting to SQL Server. The server was not found or not…
-
1
votes2
answers154
viewsQ: Explanation in constructor method
I have some questions about the method of constructing a class that I am seeing as an example, if anyone can explain thank you. private static IList<Categoria> categorias = new…
-
1
votes1
answer154
viewsQ: Does not send email password recovery by Sendgrid
I implemented a class for sending password recovery email, but the email is not sent. Class code sends email: public static Task EnviaEmail(string email, string assunto, string mensagem) { var…
-
1
votes2
answers1886
viewsQ: Assembly Microsoft.Owin not found
In my project I am using the OWIN library for user authentication. I already installed the package, but when I run the project I return the error: Could not load file or Assembly 'Microsoft.Owin,…
-
0
votes0
answers53
viewsQ: error running view Asp.net mvc
When running the project and calling the view is returning me the following error: The view at '~/Views/Produto/List.cshtml' must derive from WebViewPage, or WebViewPage<TModel>. View code:…
-
0
votes3
answers1454
viewsQ: sending email by smtp
I made a class that has the following code to send an email: try { WebMail.SmtpServer = "smtp-mail.outlook.com"; WebMail.SmtpPort = 25; WebMail.EnableSsl = true; WebMail.UserName = "meuemail";…
-
6
votes1
answer3121
viewsQ: Class and interface difference
What is the difference between class and interface and when I should use one or the other?
-
1
votes2
answers137
viewsQ: Getting registration id
I have a table with multiple records and a link to delete, how do I click this link to pass the id value of the record I want to delete ? Code from my view: @model…
-
8
votes1
answer3777
viewsQ: When should I use Modelstate.Isvalid?
When should I use the ModelState.isValid? Is it only in the insertion of data? And in the case of update and delete? We need?
-
1
votes1
answer92
viewsQ: Migrations error c# MVC
I created a Finance Drive Controller, but when I click on the menu to list returns the error: Invalid Object name 'dbo. Move'. Why did that name stick? It was supposed to be Movimentacoes. PS: I…
-
1
votes1
answer391
viewsQ: box-shadow css property
good evening, I created a css to validate my textbox and put the property box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); When I run the application the style is not applied in the textbox and the…
-
0
votes1
answer56
viewsQ: Error while Logging In
I created a View here to log into my system, but in part of ModelState.IsValid just call me back false, I don’t know why, someone could help? My code of View is as follows: [HttpPost]…
-
1
votes0
answers44
viewsQ: Error saving special characters
Good morning, I have a problem, I work with flex and java, I have a part in the system where I save text, I can record anything, but when trying to save special character type º° , the system brings…
adobe-flexasked Desalex 455