Questions tagged as 'c#'

1
answer

Is it possible to insert parameters in the filters attributes?

I use ASP.NET and to do access control by level, I use a filter that checks the user's permission level and allows access to view . [HttpPost] [AutorizacaoFilterAttribute] //Esse filtro analisa a permissão do usuário public ActionResult GetEm...
asked by 08.05.2018 / 17:17
2
answers

Create folder on every console usage

I got a program ready on the internet to create a folder, so I tried to adapt it for me but I can not do it. I would like every time I run it, create a subfolder inside the main with a different name, and let that name be the day I was using,...
asked by 19.09.2017 / 17:48
1
answer

Generic Class receiving a List?

In C # I have how to implement a generic class where 1 of the attributes received is a List object
asked by 18.09.2017 / 19:45
1
answer

Modeling - Model

I'm having trouble creating my models. Let's imagine that I have 4 different types of products (Here like A, B, C and D) public class Produto { public int ProdutoId { get; set; } public TipoProduto TipoProduto { get; set; } //enum t...
asked by 24.08.2017 / 21:16
1
answer

How to make an event work with xamarin.forms and C #

When I declare an event in my MainPage.xaml, I can not do the deployment. In the visual it says that the implantation was done successfully, but in my cell everything is white and can not even navigate in it, even music if I am listening I can n...
asked by 29.08.2017 / 21:58
1
answer

How to start a textbox with value 0 (zero)? [closed]

I have a form created with Windows Forms, and in this form I have textbox that will receive numbers. How do I make this textbox , when initializing, already filled with value 0, that is when I open the form, textbox alread...
asked by 01.09.2017 / 14:47
1
answer

Error Customizing MVC5 Routes

The error occurs in the RegisterRoutes method in RouteConfig.cs on the routes.MapMvcAttributeRoutes(); When running in the browser: * The built-in constraint of type 'DefaultInlineConstraintResolver' could not resolve the follow...
asked by 18.01.2018 / 21:55
2
answers

How to create a header of type date but in the form of ISO 8601

I am creating a communication with a web api and I needed to create a header of type date but formatted to ISO 8601 . What I want is to get the following output:    Date: 2017-09-13T08: 21: 08Z My code is as follows: var tempo = Date...
asked by 13.09.2017 / 10:36
1
answer

Bind of CosmosDB at Azure Functions Local

How to do Bind Azure CosmoDB by Visual Studio in Azure Functions? Note the code below, the inputDocument parameter would be the CosmosDB Bind. When we create the direct function in the Azure portal, it already does this automatically because...
asked by 17.08.2017 / 02:15
2
answers

How popular is an object with the return of a WebApi query?

How popular is the variable _clientes type Cliente with the return of a query to a WebApi ? Following the great suggestion of the Damon Dudek I came across the error below: publicclassClienteController:Controller{Htt...
asked by 22.08.2017 / 23:37