Posts by JcSaint • 2,037 points
69 posts
- 
		1 votes0 answers40 viewsQ: Swagger does not display methods containing array parametersI created a WebApiwith basic methods intended to use the Swagger. I noticed that methods that have simple parameters like the one illustrated in the code below are displayed by Swagger but methods… 
- 
		11 votes2 answers199 viewsQ: What are the deconstructors?When studying about Records in C# 9 was filed the appeal Deconstruct() where the object is assigned to a Tuple. What is a Deconstruct()? Does it remove the reference of the object causing it to… 
- 
		2 votes0 answers49 viewsQ: What is the point of using await in asynchronous methods?Studying on asynchronous/synchronous operations one point was not clear, which would be the use of the await in methods async as in this example found on MS’s own website. If the method… 
- 
		3 votes1 answer56 viewsQ: What is the reason for using "super()" before creating daughter class variables?I found this question which speaks almost of the same subject but her focus is on access to parent class methods. And my doubt is to know why the use of super() before the declaration of variables… 
- 
		2 votes1 answer140 viewsQ: "null" is a value or a state in which the property is located?When checking if a property/variable/object is null(o), are we checking its value or state? For example, if I have the object Quadrilátero with the properties LadoA and LadoB it will not be possible… 
- 
		1 votes0 answers69 viewsQ: Error Performing Update on Entity FrameworkI have the following relationship between Agenda and Contact: An Agenda may have N Contacts; A contact can be in N Agendas; In other words, I have an N:M relationship between the Agenda and Contact… 
- 
		1 votes1 answer67 viewsQ: Command Validations - CQRSI’m learning about CQRS and in a Hangout promoted by a Micrososft MVP he presented an implementation of Command where the model data are validated within the validation of the Command. Date… 
- 
		0 votes1 answer164 viewsQ: Error when deleting record with Entity Framework when mapping entityWhen I try to delete a record from the Mapper (Model to Domain) have the following error as return from E.F: failed because Another Entity of the same type already has the same Primary key value.… 
- 
		1 votes0 answers28 viewsQ: How to solve the Stackoverflow exception that occurs in the Entity Map for the Model?In my application a Team has several users and a User belongs to only one Team (1:N), so I have the following entities: public class Equipe{ public Guid EquipeId {get; set;} public string Nome {get;… 
- 
		0 votes4 answers1289 viewsA: How to write a Datetimepicker to the databaseHow to obtain the date selected in DateTimePicker is the following: private void button1_Click(object sender, System.EventArgs e) { var dataSelecionada = dateTimePicker1.Value; } This will return… 
- 
		10 votes1 answer121 viewsQ: What is Metadata-Based Architecture (MDDA)?What is a Metadata-Based Architecture? When using this type of architecture? 
- 
		2 votes1 answer544 viewsQ: Check null or empty fields in an entity without consecutive use of "if-Else"In a system integration there are data updates on both sides, where you get the record of Side A and the record of side B. If there are null fields in A and these exist in B then A is supplemented… 
- 
		8 votes1 answer179 viewsQ: Is it possible to work with Javascript Enumerators?Commonly used in several languages Enumerators make life easier for developers when they need to create a "list" of values within an application. Within the Javascript it is possible to use this… 
- 
		10 votes4 answers1741 viewsQ: How to identify and when to use Value Object?I am studying on Ddds from the books of Eric Evans and Vernon. During reading I came across the implementation of Value Object, I even understood the concept but could not abstract to a real… 
- 
		6 votes1 answer917 viewsA: How to insert a breakpoint into Javascript by codeYou can use the keyword debugger function(){ debugger; // quando estiver no modo de debug (F12) o cursor irá parar aqui alert("Is me..."); } 
- 
		0 votes1 answer404 viewsA: Fullcalendar C#According to the documentation in: dayClick $('#calendar').fullCalendar({ dayClick: function(date, jsEvent, view, resourceObj) { alert('Date: ' + date.format()); alert('Resource ID: ' +… 
- 
		2 votes2 answers116 viewsQ: Dbcontext finds Connection String in Web Project, but not in Console App projectI have a project Class Library which contains the context, configuration files and access classes to the database. His reference in an Asp.Net MVC project works normally, he accesses the data and so… 
- 
		3 votes1 answer4278 viewsA: How to sign a PDF digitally in C#?For this purpose you can use the Itextpdf. In this link you find an example of how to sign and verify the signature of a PDF. This is an example with Itextsharp… 
- 
		2 votes1 answer291 viewsQ: Insert error with FKI have two tables, Client and Plan, which have the relationship 1:1. I have 3 plans registered in the database with their respective data. But when trying to insert a Customer that has a Foreing Key… 
- 
		7 votes2 answers814 viewsA: Monitoring internet connection at runtimeFor this purpose you can use the Fluentscheduler... using FluentScheduler; public class MyRegistry : Registry { public MyRegistry() { //executa o código a cada 30 segundos… 
- 
		4 votes1 answer1934 viewsQ: Class Factory Recovery Failure - Console ApplicationI have a Console Application that performs connection with the SQL. On other machines the application is working normally, but has one that has the version Windows Server Enterprise SP2 who is… 
- 
		0 votes2 answers211 viewsA: Alternative to the Event Trainer that fires on completionFor those who might have the same need, I have found an alternative to the marquee, using the Jquery Scrollbox… 
- 
		0 votes1 answer35 viewsQ: Conversion of value from the database to monetary value with errorIn the database(SQL) I have a field called Valor which is a decimal and contains the following value: 21581 that would be R$215.81 But in doing the casting of this value he is returning… 
- 
		8 votes2 answers1281 viewsQ: Good practices in declaring variables in a forI’ve been making use of Resharper lately and I’ve enjoyed the experience of using it, but something’s been puzzling me. At times he suggests that certain variables be declared within some scopes, as… 
- 
		2 votes1 answer40 viewsA: Datapicker com @Html.EditorforFor this you can use the Datepicker Bootstrap as follows: <div class="col-md-3 col-sm-12"> @Html.LabelFor(model => model.DataInicialContrato , htmlAttributes: new { @class =… 
- 
		4 votes1 answer1089 viewsA: Save image in Xamarin FormsTo save the image you can do as follows: Create a Memorystream passing his Array in the builder; Upload the image to stream using Imafe.Fromstream Use Save("image name", Imageformat.Jpeg var… 
- 
		1 votes4 answers479 viewsA: Remove object from an ArraylistError occurs because the collection listVagas was amended during the foreach. Create a temporary collection and add the objects you want to: var listaTemp = new List<seuObjeto>(); foreach(var… 
- 
		1 votes2 answers211 viewsQ: Alternative to the Event Trainer that fires on completionThe marquee has been discontinued and the alternative is to implement a css to perform the same text scrolling effect, which is valid. But a need arose to get the moment when the scrolling of the… 
- 
		2 votes1 answer63 viewsA: Help with a MVVM viewIf you look at the project used by the tutorial, you will see that there is a ViewModel by the name of StudentViewModel and a UserControl which is the View by the name of Studentview.… 
- 
		2 votes1 answer54 viewsA: How to execute query at the turn of the day?You can use a feature from MySqlcalled Event. In a simple way a Event is a script that you set up to run from time to time. The event below will run every day at 00:20, the date given is the date… 
- 
		3 votes2 answers2606 viewsA: How to play an audio in C LanguageYou can use a library, which will facilitate your development. FMOD SDL BASSDLL Example with FMOD #include <conio.h> #include "inc/fmod.h" FSOUND_SAMPLE* handle; int main () { // init FMOD… 
- 
		20 votes2 answers1906 viewsA: What is the View in the MVC standard?What is the View in an MVC model? Part of the answer to that question is in your other question, when you say that I know what the customer sees (data representation). This view can be via HTML, XML… 
- 
		6 votes1 answer4514 viewsA: How does "position: Sticky" work?There are several questions in one, let’s go by part. But I don’t understand how this works in practice... Here are two examples of sticky working Sticky 1. Sticky 02 Note that when performing the… 
- 
		1 votes2 answers848 viewsA: What should be the communication between Model and View using MVC?Come on. The methods of inserting, updating, removing and listing the records, must be created in a separate class in Modal? This will depend on your architecture, you can "decouple" that part by… 
- 
		1 votes1 answer726 viewsA: Difference between recv and read, send and writeSend Both clients and servers use the function send to transmit data. Typically, a client sends a request and the server sends a response. Recv Both clients and servers use the function recv to… 
- 
		1 votes2 answers196 viewsA: Parameter arriving truncated way in Ajax requestI was able to solve the problem by placing the parameter between "'". Code below: var valorCampo = $(this).attr('data-clipboard-text'); var content = {valorPesquisa: "'" + valorCampo + "'"};… 
- 
		1 votes2 answers196 viewsQ: Parameter arriving truncated way in Ajax requestI have a requisition Ajax that gets the data I need from a WebMethod. The problem is that the parameter used for the request is "coming" truncated in the WebMethod the length of the parameter is 44… 
- 
		1 votes1 answer33 viewsQ: How to maintain the Sql connection for a long timeMy application makes the select on the table To server 1 and with the result of select is made a insert on the table B server 2 with the query data. The routine works for a certain time, then I have… 
- 
		0 votes2 answers488 views
- 
		1 votes2 answers1568 viewsA: How to display a modal using the c# and bootstrap button?You can display your modal from the backend using the ScriptManager: ScriptManager.RegisterStartupScript(this, GetType(), "LaunchServerSide", "$(function() { funcaoQueExibeModal(); });", true); On… 
- 
		1 votes2 answers1355 viewsA: Is there a way to redirect to another page by clicking on a div?Define a id for div and use the function click $('#idDiv').click(function() { document.location = 'http://suaurl.com/'; } ); 
- 
		0 votes2 answers1873 viewsA: How to check if the query did not return data?You can check if your query returned any line: if(!reader.HasRow) return null; On the other side, where you consume the method, just check if the return is different from null. You must make this… 
- 
		1 votes0 answers203 views
- 
		0 votes1 answer345 viewsQ: Publish Visual Studio does not connect to remote computer (Web Deploy)When trying to publish my application via Visual Studio (Publish...), have as return an error message stating that it was not possible to connect to the remote computer. The Web Deploy the server is… 
- 
		1 votes0 answers339 viewsQ: Event Button click, added dynamically, does not workI’m working on a page that loads a list of items into a GridView. The content is being loaded normally, but the need to add a cell with a text and two buttons. With the code below is adding the… 
- 
		1 votes5 answers29254 viewsA: How to convert date to dd/MM/yyyy format?you can use Datetime.Parse var dt = DateTime.Parse("2016-05-08 04:00:00 PM").ToString("dd-MM-yyyy HH:mm:ss"); 
- 
		2 votes2 answers520 viewsA: Changing Rows in Datagridview / Opening a form with different designFor this you will do as follows: Use the checkbox to define which row you want to change; Create an instance of form that you are using to create a new record: var f = new MeuFormCadastro(); Then… 
- 
		1 votes1 answer722 viewsQ: Dns.Resolve() vs Dns.Gethostentry()The method Resolve is as obsolete and Microsoft guides to use the GetHostEntry. However when using GetHostEntry the exception occurs: This host is not known When I use Resolve there is no exception… 
- 
		1 votes2 answers295 viewsQ: Multiple device connections using SocketsI have a method that connects to a card reader via TCP/Ip (ip, port) using Sockets. For the 1:1 connection is working, but now I need to connect to more than one device simultaneously. I would have… 
- 
		1 votes2 answers118 viewsA: Separate front-end and back-and from executableMatheus in the case of WPF seeks to work with MVVM, since WPF does not work with "Controllers". You can even use the same principle of the MVC structure, but to do so create directories that…