Posts by Márcio Sebastião • 769 points
40 posts
-
0
votes1
answer31
viewsQ: Marking changed properties instead of using the traditional Update is a good practice? (Ef core)
I have chosen to use the update in this way: _context.Entry(site).State = EntityState.Unchanged; _context.Entry(site).Property(x => x.Name).IsModified = true; _context.Entry(site).Property(x…
-
2
votes0
answers48
viewsQ: How many bytes has a decimal (18.8)
How do I calculate the number of bytes of one decimal? In my decimal case (18.8). Why decimal (18.8)? A: Because I will save exact values for bitcoin in my BD Recommends a better way than…
-
0
votes0
answers34
viewsQ: Why use Asp.net core DI Container in conjunction with Onconfiguring the Entity Framework?
In many projects I realize that people tend to pass the Connection string both by dependency injection and optionsBuilder in the overlay of the Onconfiguring method.... What’s the point of using…
-
1
votes0
answers128
viewsQ: Disengage 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…
-
4
votes1
answer117
viewsQ: Is it bad practice to use "Guid" and "int" for the same bank?
In a project I’m developing I prioritize the use of Guid for PK because of the ease for me, but it has a table that would be more advantageous to use int. This is wrong?…
-
1
votes1
answer185
viewsA: Help me consume the IBM Watson NLU API
Out of ignorance of mine, I thought the answer was a mistake when in fact I was just implementing in the wrong way. The API asks for at least one Feature...to be specified. Before posting the doubt…
-
2
votes1
answer185
viewsQ: Help me consume the IBM Watson NLU API
Yesterday I watched a video of a guy who consumed Watson’s Natural Language Understanding API (IBM cloud) with JS using Node and he did some pretty cool things with it... On the other hand I’m…
-
3
votes1
answer825
viewsQ: Bug in VS Code output terminal characters
In my output terminal the accented letters and the "Ç" are replaced by interrogation, someone knows how to fix it? Example: Compila��o com �xito. 0 Aviso(s) 0 Erro(s)…
-
1
votes1
answer83
viewsQ: Dependency 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…
-
0
votes1
answer76
viewsQ: Extension for Chrome - How to use the DOM on the site that is open
How do I use the DOM of a page that is open in the browser by the code in my extension? Ex: In the popup of my extension has a button, which I hope when clicking, the value of a div on the open site…
-
6
votes1
answer67
viewsQ: Is there a correct way to pass parameters to search?
I am making a Restfull application and it occurred to me the following doubt: "Am I passing parameters in the correct way for this method?" The method in question is this:…
-
0
votes0
answers46
viewsQ: Web Api - Is it wrong to get a related object like this?
I started developing with Web Api (Asp.net Core) and I have a doubt about this right or wrong what I am doing... I have two classes in 1 to N: The Department class: public class Department { public…
-
0
votes1
answer235
viewsA: Web Api does not return related data
Problem solved! The problem occurred because apparently by default, Json options have a precaution to avoid reference looping. What I did then was ignore it, as follows: In my project’s Startup, I…
-
0
votes1
answer235
viewsQ: Web Api does not return related data
I’m doing some tests with Web Api (Asp.net core). And with Eager Loading I’m trying to upload a related list, but what I get from Postman is this:…
-
2
votes1
answer456
viewsA: How to Input Data in Debugging with VS Code
Get what you wanted by following this tutorial. Basically what I did was change Launch.json from VS code to line with "console": "internalConsole" for "console": "integratedTerminal" and from there…
-
2
votes1
answer456
viewsQ: How to Input Data in Debugging with VS Code
I started using VS Code to program, I like it a lot. But in a simple console application, when I am in debugging and arrives in a line with Console.ReadLine() you can’t input data, I write on the…
-
1
votes1
answer48
viewsQ: How to show queries generated by EF core
A while ago, with a simple code within my context, I would show the queries generated by EF6 on the console or even write to a txt file... However, today I use Entity Framework Core, in an Asp.net…
-
1
votes1
answer55
viewsQ: Change /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:…
-
0
votes1
answer1829
viewsQ: Call action with button click by passing parameter
I will have 3 buttons, each with a different id, how do I pass this id to my controller action when clicked? public IActionResult Index(int id) { var lista = _listaService.sites(id); return…
-
0
votes1
answer58
viewsQ: Improve routes
Do people have a better way to do these routes? Or for every action in my Controller I’ll have to create your routing? app.UseMvc(routes => { routes.MapRoute( "Login", "Login", new { controller =…
-
2
votes1
answer437
viewsQ: Pass controller error to view
I am making a basic login form and I find myself in the following situation: I want to return an error if the user does not exist in the database and am doing so using "Modelstate.Addmodelerror".…
-
1
votes0
answers115
viewsQ: Jumping id 1000 Sql server 2014 (localDB)
In my application a few times when I will add some data to the database the ID jumps in 1000 drives. I found some solutions, but they are not good for me because I use EF6 with code-first and my…
-
1
votes1
answer47
viewsQ: Orderly list return at BLL?
In my project I use the EF6, use generic repositories and in my layer BLL I have the class ClienteBLL, which is a class that has the logical implementation methods of the class. In one of the…
-
5
votes1
answer101
viewsQ: Persist data in related tables (1 x N)
I have these 2 related classes, and the requested class has a Collection of "Itenspedidos"... The Request class: public class PedidoDTO { public int pedidoID { get; set; } public int codigo { get;…
-
1
votes1
answer82
viewsQ: Relationship 1x1(or not)
I have 2 entities: Itempedido and Product... Using the Fluent API as I say to my Itempedido entity that she has a Product? Note: The product entity cannot have dependencies, although 1 product can…
-
0
votes1
answer215
viewsQ: (Localdb) Error after Update-Database command -> "Cannot attach the file ...."
I am trying to use Sql Serve Localdb in an application with Entity Framework and Migrations, but when I give the Update-Database command, the following error occurs: Cannot attach the file 'C:…
-
1
votes2
answers109
viewsQ: Is it wrong to put this much code into a button click event?
It is wrong to put this amount of code in an event of click button? private void CPeBTNSalvar_Click(object sender, EventArgs e) { try { if (CPeTBCodigo.Text == "") { throw new…
-
0
votes2
answers731
viewsQ: Anti-adblock which replaces div
I need a wordpress plugin or script in which present a message to the user who has Adblock. However, I want that message to appear in place of a div. I’ve tried the plugins: JGC Adblocker Detector -…
-
0
votes1
answer532
viewsQ: Fatal error: public_html/wp-includes/option.php on line 126
I migrated my Wordpress site to another hosting, I did everything right, however this occurring error: Fatal error: Uncaught Error: Call to Undefined Function untrailingslashit() in…
wordpressasked Márcio Sebastião 769 -
0
votes1
answer54
viewsQ: Is there any way to include the Wordpress header in an external page I created?
When I create a folder with the index inside my site files (where this is installed wordpress) appears the blank page and the to put things and stylize normally, but there is how I include my theme…
-
-1
votes1
answer507
viewsQ: How do I place a downloadable file with a unique id for each person who downloads
How do I put a file to download to my website where the button link changes every time after the file is downloaded and never to a person to download by the same link that has already been…
-
0
votes1
answer79
viewsQ: Javascript: Hide button after "subscribe" event
People in this google script have a comment written "Add code to Handle subscribe Event." translating "Add code to handle signature event.". I want to know if there is a way I can put a code in this…
-
7
votes3
answers1464
viewsQ: How to change the text of a link after clicked?
How do I do in HTML (or CSS if you have how) the text of a link where it is written "show more" change to "show less" and vice versa after clicked?
-
6
votes2
answers760
viewsQ: How to hide half a piece of content
How do I do what is illustrated in the picture? Knowing that the content is not just text but buttons and other things from a website homepage!…
-
0
votes1
answer63
viewsQ: Cookies do not work
Hello folks a friend here from the forum helped me make a button and I thank him very much, it worked perfectly. However I failed to put cookies and I don’t understand where I’m going wrong (I was…
-
0
votes1
answer207
viewsQ: When I click the button more than 1 time the count accelerates
People I got from a friend here on the forum a one button script with countdown, that when clicking starts the count. I really appreciate it because it is very good... there is only one problem,…
-
0
votes1
answer89
viewsQ: When I click on button 2 is the time of button 1 that starts!
People I have a code in java script, which makes the following when I click on one of the buttons starts a count of 60 seconds, the problem is that I have 2 buttons, the button 1 and the button 2…
javascriptasked Márcio Sebastião 769 -
1
votes1
answer180
viewsQ: How to define formatting for a multi-column table using classes?
I made a website and inside the body has 6 columns with links and each column is within a class, kind of: class="coluna 1" class="coluna 2" class="coluna 3" What I want to know is whether this right…
htmlasked Márcio Sebastião 769 -
-4
votes2
answers328
viewsQ: Do you know about cookies?
I was looking for more knowledge about cookies on youtube and only found video in English, but what’s the big deal? I don’t speak English! However I was able to understand that cookies work in this…
-
11
votes4
answers12823
viewsQ: How to make a countdown with javascript?
Hello guys I don’t understand practically anything Javascript, so for weeks I was trying to make a script that did the following: 00:00:00 1º start a countdown of 20 minutes after clicking a link.…