Questions tagged as 'c#'

2
answers

How does a SQL Injection happen?

Why creating parameters for each field that will be updated helps prevent SQL Injection? Example: SqlCommand comm = new SqlCommand("UPDATE Contatos Set Telefone = @Telefone, " + "Cidade = @Cidade, " +...
asked by 27.11.2015 / 16:23
5
answers

Programs written in C # depend on the .NET Framework to run?

Since compiling a C # code depends on the .NET Framework installed on the machine to run, similar to Java?     
asked by 27.09.2017 / 02:03
2
answers

How does the Where logic in the Entity Framework work?

I'm studying C # and just did my first query in the Data Bank: using System; using System.Data.Entity.Core; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Test.Models {...
asked by 28.04.2016 / 19:42
1
answer

How to change the namespace of a C #

The project was created with the name Windows and I want to change it. The problem is that if I simply right click on the project and rename it, the project gets full of error. I tried changing the Assembly name and Default namespace but it also...
asked by 14.01.2016 / 16:49
2
answers

Inquiry Lambda

I have the following query in T-SQL : SELECT TOP (60) COUNT(*) AS QTD, SUM(Duration) AS Total, AVG(Duration) AS Media, MIN(Duration) AS Menor, LEFT (TextData, 80) AS TextData FROM Traces WITH (nolock) WHERE (StartTime &g...
asked by 20.03.2014 / 14:17
2
answers

Save and send selected item id in dropdowlinst

I'm trying to do a search by filtering through a dropdowlist. In summary, I select a level of instruction in a list and clicking on 'Search' I want to return the list of people who have that level of education. My problem is in identifying the i...
asked by 09.12.2015 / 19:48
5
answers

How to solve accentuation problems with ASP.NET MVC?

I'm having problems with accentuation in ASP.NET MVC 5. I'm using Visual Studio 2013 Professional and the .Net 4.5 application. SQL Server 2008 and Entity Framework 6. The browser is Google Chrome upgraded and Windows is 8.1. Example: W...
asked by 03.03.2014 / 00:22
2
answers

What is the difference between typeof (T) vs. object.GetType ()

What's the difference? Is there a difference between performance?     
asked by 18.03.2014 / 14:57
3
answers

How can I send an email through GMail?

I want to create an application to send email, I would like to use a GMail account to send these emails, how can I do that?     
asked by 19.12.2013 / 03:32
3
answers

Validate credit card number

How do I validate credit card numbers? I will not be integrating with card operator, I just need to validate the number, as it does with validation with CPF.     
asked by 09.11.2015 / 20:26