Questions tagged as 'c#'

1
answer

SHA1CryptoServiceProvider and SHA1Managed return different results

I need to encrypt a string using SHA1. I was able to encrypt using the SHA1 class in this way: public string CriptSha1(string secret) { string result = ""; byte[] key = System.Text.Encoding.UTF8.GetBytes(secr...
asked by 26.06.2015 / 23:10
2
answers

Serialization of a large list in JSON.Net

I have a problem with the serialization of an object (a list of a class with approximately 5000 items). I am using JSON.NET to generate the Json string but it is getting the following problem, in the middle of it is a text like this: ,{"Sta...
asked by 23.12.2015 / 14:35
1
answer

Error while executing DatabaseFactory.CreateDatabase ()

I'm getting the following error when executing the DatabaseFactory.CreateDatabase() function:    "Setup failed to initialize" The app.config is as follows: <?xml version="1.0"?> <configuration> <startup&...
asked by 25.12.2015 / 00:03
1
answer

Gridview inheriting properties

In all my grid's I have to set many properties, I would like to know if there is any way to set properties only once in a single place. Grid example:     
asked by 27.08.2014 / 22:02
2
answers

Error returning list with Fluent NHibernate

Within the Web.API project, I've created a Get () method which returns a list of objects - IList. This PersonAcess class has a Log list (1: N). When you execute the Get () method, an exception occurs: <ExceptionType>System.InvalidOper...
asked by 31.07.2014 / 14:20
1
answer

Problem with Custom Routes and HttpHandler in ASP.NET MVC

In a project I'm working on, I wrote a HttpHandler to get an image instead of a View , something like this: using System; using System.Web; using System.Web.Routing; using MeuProjeto.Data; using MeuProjeto.Infrastructure; namespace Me...
asked by 16.04.2014 / 17:38
3
answers

How to test performance Entity Framework?

I want to create mapping with inheritance Person - > Customers, etc. But I would like to test performance with the 3 types of mapping (TPH, TPT, TPC) How do I? Anyone had experience to talk which of the 3 becomes easier and faster?    ...
asked by 14.08.2014 / 15:32
2
answers

Adding checkbox to datagrid rows

I have an application in WPF , in which there is a window with a datagrid with several lines, having only registers. In this window there is also a button and it is necessary for the user, when clicking the button, to appear on each...
asked by 10.03.2015 / 19:38
1
answer

How to use multiple classes as User in Identity - Asp.Net Identity

I want to use 2 classes as User in Identity and I could not see this change in the code. Let's assume that I will use the default class "ApplicationUser" which generates an "AspNetUsers" table and I want to use another "Customers" table that...
asked by 09.02.2015 / 20:11
2
answers

How to minimize a C # application?

How do I minimize or close (to the tray) any C # application? I'm trying to minimize TeamSpeak to the system tray.     
asked by 14.12.2017 / 21:46