Questions tagged as 'c#'

4
answers

LIKE SQL clause does not work with SqlParameter

Following the recommendation that @bigown did in this question I decided to parameterize the SQL queries of my program. See: private void btnConsulta_Click(object sender, EventArgs e) { if (optID.Checked) //Consulta por ID...
asked by 20.12.2015 / 17:13
1
answer

Multiple INNER JOINS with DAPPER

I'm trying to make multiple INNER JOIN in Dapper with these classes: public class EventoConfiguracao { public EventoConfiguracao() { //CdEventoConfiguracao = Guid.NewGuid(); Menus = new List<Menu>();...
asked by 21.01.2017 / 03:12
2
answers

Is there an alternative to RemoveAt?

I'm using Entity Framework in an Asp.Net MVC project where I have a simple list of strings and need to remove only the first item. I used the following command: minhaLista.RemoveAt(0); Well, but using a Visual Studio performance tool, I...
asked by 10.02.2016 / 21:02
1
answer

How to create a log in html with log4net

I have a project that already uses log4net, but I would like to display this log in HTML. I searched through multiple sites and no one implemented this solution. Does anyone have any idea how to do this?     
asked by 26.06.2015 / 20:49
1
answer

How do I extract the values of an Expression?

Hello. Is it possible to extract from an Expression what filters, computers, etc. were used in a query? Example: public class Program { class Produto { public int Id; public string Nome; public Produto(int i...
asked by 06.10.2015 / 22:15
1
answer

How to use the ruleset functionality of FluentValidation in Web API?

I would like to use a FluentValidation feature called ruleset in a Web API project because it does not I want to have to be doing model validation manually every time an action method is called. So I used the FluentValidationModelVali...
asked by 06.01.2016 / 12:31
2
answers

Time-out expiring faster than expected - ASP.NET

I have an application that is working ok, however, when I spend a little time without interacting with the page the user authentication drops and the system returns to the login screen. I'm trying to set that time for 20 minutes in web config bu...
asked by 09.07.2015 / 21:20
1
answer

Capture pressed buttons on video game control reliably

I want to use an XBox control to control a program. It's not a game, it's just a Windows Forms application. I do not want to use XNA because I do not want to force the redistributables to download when I use my application on another machine....
asked by 23.03.2014 / 20:45
1
answer

Can you use a dialog to open both folders and files?

Well, I'm using openfiledialog to open files, but the software needs to receive files or folders, because it compresses and zips ( .zip ) to then make a symmetric cipher. I searched through a number of sites and the like, and I d...
asked by 21.12.2015 / 14:22
2
answers

Digital signature validation

I am developing software for integrating with the webservice of the legal note for the issuance of electronic invoices of the city of Porto Alegre. After some difficulties I managed to fine-tune the xml so that it conforms to the standard, bu...
asked by 15.12.2015 / 12:57