Questions tagged as 'c#'

3
answers

Use ajax with ActionLink

I want to change the ActionLink and URL to work with Ajax , but I do not know how to do that. Follow my code with ActionLink and URL . <ul class="nav" id="side-menu"> <li> <a href="...
asked by 12.06.2014 / 14:57
1
answer

Is it recommended to use C # 6 in Visual Studio 2013?

In Visual Studio 2015 I see that it is possible to define the C # version: Source: link However, in% w / o%, it is necessary to install a Visual Studio 2013 package via nuget with a "help" of Microsoft.Net.Compilers 1.0....
asked by 15.08.2015 / 23:28
2
answers

Keep data between sessions

I have an ASP.Net MVC project where I generate a report that requires a lot of the machine's processing feature. I have a Action that generates and another that returns the report data in an Object List, so I thought that by creating a...
asked by 13.09.2015 / 14:58
2
answers

When should I use GC.SuppressFinalize ()?

In .NET, under what circumstances should GC.SuppressFinalize() be used? What are the advantages of using this method? Note: I found the answer in the SO-en: When should I use GC.SuppressFinalize ()? As I did not have something r...
asked by 08.12.2015 / 14:35
1
answer

How useful are indexers?

I was watching and Csharp has indexers. Second definition on the microsoft: site    Indexers allow instances of a class or structure   are indexed only as vectors. Examples: internal class Indexador<T> { private T[]...
asked by 27.05.2015 / 19:46
1
answer

Authorization in Asp.Net MVC

I'll try to be clear. In most instances of authentication and authorization of access in ASP.NET MVC, I see that the authorization control is usually done in Controller , with the decoration of the class itself inherited from Control...
asked by 24.11.2015 / 19:16
1
answer

Add property in relation to N-N

How to add properties (columns) in an N-N relation using EF? For example, I have class Produto : public class Produto { [Key] public int ProdutoID { get; set; } public string Descricao { get; set; } public decimal Valo...
asked by 12.03.2015 / 14:10
1
answer

The entity or complex type '*' can not be constructed in a LINQ to Entities query

I can not do this? public List<Filial> GetAll() { //Mostra todos os registros incluindo os desativados para os Administradores var ret = _db.Filiais.AsNoTracking() .Where(e => e.Visible) .Orde...
asked by 07.02.2017 / 15:48
1
answer

Doubt about Many-to-Many Relationship EF

I am doubtful in a following Rule: I have N Products and N Coins. From this relationship I will have the ProductMode table: ProdutoMoeda Id - ProdutoId - MoedaID - Nome 1 2 1 ProdutoNome + MoedaNome 2 1 1...
asked by 17.05.2017 / 17:47
1
answer

How to create a monolithic executable from the .NET application?

I would not like to deploy the application full of DLL, I wanted something simple, without installer, I wanted to generate a single executable file, but .NET is all based on DLL. Can you generate a single executable?     
asked by 27.03.2017 / 14:04