Questions tagged as 'c#'

1
answer

Methods with parameter Dynamic C #

I need your help with the following question. I have a data access class that has a method that takes the parameters to execute a stored procedure. The problem is this, I have several objects in the application and I'm trying to create a c...
asked by 20.06.2016 / 01:52
1
answer

Create unique attribute beyond the Primary Key in code-first

I am creating a Logradouro table where the CEP field is not the primary key, but must be unique. How do I do this using code-first in Entity 6.0 ? To create primary key I use the HasKey method: ToTable("Logradouros...
asked by 16.06.2016 / 21:27
1
answer

Format Array display in C #?

I have a string Array. string[] nomes = { "Maria", "João", "Francisco", "José", "Antonio", "Osvaldo", "Francimar", "Cirineu" }; I would like to display them exactly like this in the Console Maria João...
asked by 19.11.2018 / 22:54
1
answer

How to leave a form always behind?

I'm trying to leave a form always below the other forms, it does not matter if the user clicks on it, it should always be underneath but usable, something like the desktop, and that's where the problem is, no I'm trying to do this, I'd like to k...
asked by 13.04.2014 / 05:38
1
answer

Call a non-executable by Process in C #

Is there a way to call an executable other than by process? I need something that does not use the code below to call an executable because when I end a process from an application that is not native to Windows, I can not call it again with t...
asked by 08.04.2014 / 20:08
1
answer

How to internationalize Enum values?

I have the following code in the Model: public enum Lista { [Display(Name = "Lista_regular", ResourceType = typeof(Mensagem))] Regular = 0, [Display(Name = "Lista_irregular", ResourceType = typeof(Mensagem))] Irregular = 1 }...
asked by 17.04.2014 / 04:06
1
answer

Update one for many Entity Framework

Hello, I need help with an update using entity framework and one-to-many relationship. I think it's pretty basic, but I'm starting with EF and I can not solve the problem. Artist and Telephone Artist entities, where an artist can have several...
asked by 11.01.2016 / 20:58
1
answer

How to create a Managed Thread in C ++ similar to the example in C #

In C # I use the following code to create the Managed Thread: Thread thread = new Thread(new ThreadStart(minhaFuncao)); In C ++ I did: using namespace System::Threading; . . Thread^ thread = gcnew Thread(gcnew ThreadStart(...
asked by 25.04.2014 / 14:17
1
answer

Partial does not render

I have a problem with my application. What happens is that I am not able to render a partial in another view. Here is the partial code: @model CEF01.Models.Ocorrencia @using (Html.BeginCollectionItem("Ocorrencia")) { @Html.HiddenFor(mo...
asked by 15.05.2014 / 01:54
1
answer

C # Union / Order by with LINQ and Performance

Imagine the following situation there are 3 classes Class A, class B, class C, class A has many B classes and many C classes. class B has many C classes. the clsse C has a datetime date field. public class A { DBContext db = new ClassesConte...
asked by 07.05.2014 / 20:01