Questions tagged as 'c#'

1
answer

TransactionScope does not perform transactions

I'm trying to use TransactionScope in C #, I'm running tests with local bank, but every time I try to execute some method it returns me this exception: Partner transaction manager has disabled your support for remote / network transac...
asked by 19.05.2014 / 20:21
1
answer

How to convert a value in UNIX type Timestamp to DateTime?

How to convert a value to type UNIX timestamp (seconds since 1970) , example 1396148400 , in a DateTime ?     
asked by 13.04.2014 / 01:01
1
answer

Correct Statement Classes Model MVC Ninject

I started using OO a short time ago and in all projects that I see on the net, I see the following way of declaration. public class Trabalhador { public int Id { get; set; } public string Nome { get; set; } public virtual ICollecti...
asked by 19.05.2014 / 01:55
1
answer

Use LINQ aggregator dynamically

I'm trying to create a function to use Linq aggregator functions (sum, average, count) and I'm not succeeding. I have the following code: private double AgreggateDynamic<T>(IEnumerable<T> list, string propertyName, string func)...
asked by 22.01.2016 / 20:24
3
answers

How to test Filters that verify Claim data?

I have a ActionFilter for some controllers and actions that make use of the user information that is in claims . The filter itself gets the user's claims information and performs the authorization validation process: public vo...
asked by 23.11.2015 / 12:59
1
answer

Error after performing an action redirect to a page

I think I'm going wrong with the code below, it should save the Client and redirect to the Client / Index page, but after saving it stays on the same page, using Debug it passes in the Client / Index (Action and View) , but does not open the pag...
asked by 25.11.2015 / 12:32
1
answer

Accessing html objects in code in asp.net c #

I have a page that contains asp.net and html objects. How do I access design html objects in .cs with C# ?     
asked by 25.05.2015 / 21:52
1
answer

Ajax in different project

I have a project in Asp.Net MVC with the following method: public ActionResult ObterCursos() { List<curso> cursos = new List<curso>(); curso curso_ = new curso(); curso_.Nome = "Análise"; curso_.Periodo = 3; cu...
asked by 05.06.2015 / 04:18
1
answer

What is the assignment in the Action parameter, method?

I had a question about some of the codes that I found in a project of a former employee of the company. It is a code that contains assignment in the variables parameters. Here is an example: public ActionResult Teste(long id = 0, String tema =...
asked by 22.06.2015 / 15:26
1
answer

How to publish a secure .EXE without being Click Once .Net

My scenario is made up as follows: I have applications, which are configured according to each client, are mass-sold applications, I have a support system, which automates this configuration and generates one executable per client. After g...
asked by 20.05.2015 / 16:10