Questions tagged as '.net'

1
answer

What is the purpose of the "[Bind (" ID, Title, ReleaseDate, Genre, Price ")]" in a method?

I'm creating a project in ASP.NET Core MVC for learning purposes. In a given part of the Microsoft guide when the scaffold technique is approached to generate the controller and views controller , I came across an instruction in some meth...
asked by 13.11.2017 / 01:44
1
answer

What is marshalling and how does it work?

I was working with a device that sent some information to my software , but this information came in type IntPtr , to read it, I had to use the Marshal class .NET. What is marshalling and what happens when I convert a IntPt...
asked by 24.03.2017 / 04:11
1
answer

Entity Framework - LazyLoad with property that allows null

What happens to a search that uses include of Entity Framework in a property that can be null. var ocorrencia = db.Ocorrencia .Include("Pessoa") .FirstOrDefault(c => c.id == 3); This ocorrencia...
asked by 22.03.2017 / 22:50
2
answers

Operator "!=" does not work in my code?

I have a part of my program that does several checks when the button is clicked and one of these checks is: it takes the value entered in textboxRankTecnica and has to buy with the array ranksAceitaveis . If it enters a value tha...
asked by 26.02.2017 / 00:20
1
answer

In terms of performance, what is the best way to declare a variable that will be used in various Actions / Methods in a class?

Which way is better performatically speaking? Which way do you recommend and why? //Modo 1 MeuManager mm = new MeuManager(); JsonResponse MetodoDOIS(string urlImagem) { var abc = mm.Lista(); } JsonResponse MetodoUM(ImageUploadContent...
asked by 19.05.2017 / 15:12
1
answer

Creation of anonymous vs. "named (?) objects"

I have a class that loga some information in the database I am using it as follows: new StudyLogRepository().Create(new StudyLog() { StudyId = Study.Id, CycleId = null, DateOccurrence = DateTime.Now, CycleActionName = "Nova estud...
asked by 08.05.2017 / 19:06
3
answers

How to mount a lambda expression and pass it by parameter to a generic function?

I need to pass two parameters to a generic function that returns data from the database and select only a few specific columns to display in a DataGridView . public List<TEntity> GetAll(Expression<Func<TEntity, bool>> P...
asked by 07.11.2016 / 09:27
1
answer

Run program in a certain folder in IIS

I would like to know how to run an exe or jar program in a given IIS folder, through the C # .net core code. It would have to be a synchronous call, that is when the C # performs the call of the jar or exe or bat has to wait the processing and t...
asked by 05.06.2017 / 19:40
3
answers

How to access object created by another thread?

Is it possible to access an object created by another thread ?     
asked by 17.04.2017 / 06:20
2
answers

How to capture information from a 64-bit process that is running?

Well, I need help in capturing information from a running process. I can accomplish this task by accessing mainmodule of 32-bit processes, however, I can not do the same with 64-bit processes. I do not know if the reason is I'm trying to...
asked by 01.07.2016 / 08:02