Questions tagged as 'c#'

2
answers

How do I add two strings in C #?

I have a method that will get two strings and return the sum of them in string format. I use string since there will be +30 digits. I'm having trouble converting to add up. :     
asked by 11.06.2015 / 22:05
1
answer

Guid.Parse () or new Guid ()?

What is the main difference between using the options Guid.Parse() or new Guid() to convert a string into a Guid ? And which of the two approaches would be best to use? var usuarioId = new Guid(User.Identity.GetUse...
asked by 12.04.2018 / 15:03
3
answers

EF Core - Partitioning Filter

I'm working on a database that has the following characteristic, a 90% clustered index that integrates two columns: FilialID and DataCriacao . These tables are partitioned by FilialID , simple creation or removal of a Fi...
asked by 15.05.2017 / 20:02
2
answers

What is the purpose of TransactionScope blocks?

I have a code with several blocks TransactionScope and I do not quite understand its purpose. ModeloColDataContext dm = DataContextFactory.GetContext(usuario); { if (documento > 0) { using (Transaction...
asked by 31.10.2016 / 18:38
1
answer

How to make skins in ASP.NET MVC

How would skins in MVC? where the client (user) could choose the skin (would change CSS, html, images, etc)? OBS¹: Skin would be for all pages and each client can only have 1 single skin. But I would have about 10 different skins. These ski...
asked by 06.05.2016 / 19:07
1
answer

Lambda with different contexts

Is there any way of joining two or more tables using Lambda and two different contexts?     
asked by 06.06.2014 / 17:37
1
answer

Create user in AD with C #

Does anyone have a code for user creation in ad in C # .NET? I am developing in C # beginner and tried through the codes I saw here and could not do it.     
asked by 02.07.2014 / 16:58
2
answers

LINQ query with sum

I have the following query in LINQ var dados = _db.Contratos .Where(a => a.Adesoes.Any(b => b.Pago)) .Select(a => new { Contrato = a.Numero, ValorTASenior = a.Adesoes.Where(b => b.Pago).Sum(b => b.Val...
asked by 14.12.2017 / 17:19
1
answer

How to allocate an immense amount of memory?

I created an OnFly encryption algorithm that encrypts bytes without having to copy them to a new copy of these same bytes. This is both for encrypting and decrypting these byte lists. As in the scheme below, the same string that enters will be t...
asked by 07.07.2017 / 20:53
1
answer

How to copy a file from the network to my computer using C #?

I have a desktop application that needs to copy media files from a server, videos and images. The server is on the same network as the terminal on which the program is installed. The problem is that this terminal will not be logged in with usern...
asked by 24.05.2016 / 21:44