Questions tagged as '.net'

1
answer

What is Bind (Include="Property") used for?

When we create a CRUD with scalfold in ASP.NET MVC, in the POST methods, we have the following code: public ActionResult Create([Bind(Include = "Id,Nome")] Grupo grupo) {...} What is this [Bind] used for? When we use Gru...
asked by 29.12.2014 / 23:31
1
answer

Change the project from .NET 4.5 to 4.5.2, how to do it?

I installed .NET 4.5.2 on the machine, I rebooted Windows 7 and, after opening the project, I went in Debug > Projeto.Properties > Application and tried to change the version with the Target Framework combo, but there is no v...
asked by 27.08.2014 / 19:20
2
answers

Extract .ZIP file with accent on name

I'm using the System.IO.Compression.ZipFile lib to unzip .zip files and I came across a major problem when trying to extract files that have accents in the name. If I try to extract with UTF-8 encoding : ZipFile.ExtractToDirectory...
asked by 21.07.2015 / 16:39
2
answers

How popular is a model from a DataReader in C #?

Sorry for ignoring this question. In PHP there was the possibility of using the "FetchClass" of the PDO that took all the results of a table and threw them into an object of a certain class, but I did not find anything similar in C #. By the D...
asked by 09.08.2017 / 05:54
1
answer

Can LINQ be considered a business rule?

Sometimes I pull active objects with LINQ expression. Using filtering with LINQ can be considered business rule and in a scenario like Domain-Driven Design (DDD))? What is the best place to use (in Domain services or in Infra repos...
asked by 28.01.2017 / 13:13
1
answer

Disable dates before the current day in DateTimePicker?

Is it possible in DateTimePicker , disable the days before the current day?     
asked by 07.08.2015 / 18:58
1
answer

Centralize (use only one) a try-catch for the entire WPF application

Is there any way to centralize a try-catch for every application in a WPF application with C #? I've created a window to use as a% custom%. When you get an error in any system registry error, does it always fall into the same Messag...
asked by 18.12.2015 / 17:45
1
answer

Import is not working

Imports System.DirectoryServices    ERROR MESSAGE: "Warning 1 Namespace or type specified in the Imports 'System.Directory.Services' does not contain any public member or can not be found. Make sure the namespace is defined and contains at lea...
asked by 17.01.2015 / 21:20
1
answer

What's the difference between using normal methods and Action or Func?

public Action<string> Escrever = (texto) => { Console.WriteLine(texto); }; Being able to call so Escrever.Invoke("Algum texto aqui dentro"); VS public string Escrever(string texto) { Console.WriteLine(texto); }...
asked by 22.08.2018 / 16:55
1
answer

In which cases they return the error Exception of type System.OutOfMemoryException

What are the most frequent cases that can return this exception ?     
asked by 18.09.2017 / 14:35