Questions tagged as 'c#'

1
answer

Bringing other columns with GroupBy with LINQ

I have two Tables: 1st Process containing ProcessId and SituationProcessId 2nd SituationProcess containing StatusProcessId Description Templates: public class ProcessoModel { public int? ProcessoId { get; set; } public int? Si...
asked by 06.09.2017 / 16:08
1
answer

Accessing the Rasor variables inside a foreach

I'm trying to list the contents of a table, showing in each item the items of another table that maintains a relation with the first (1: N). For this I need 2 select, being the 2nd select based on each line of the result of the 1st select. The p...
asked by 06.09.2017 / 12:12
1
answer

Where Dynamic in Linq to Entities

Expensive, I need to do a dynamic where in a Linq to Entities. I researched some solutions but none could get what I need. Until then, I have the following switch: public TransportadorasGrid ObterTransportadorasBusca(Int32 PageNumber, I...
asked by 06.09.2017 / 22:23
1
answer

How to log a post on a web api [closed]

I want to know what the Web Api is receiving in the Post that I'm sending.    This is the code I'm using. var httpWebRequest = (HttpWebRequest)WebRequest.Create("https://d6dc30b8-0ee0-4-231-b9ee.azurewebsites.net/");...
asked by 29.08.2017 / 09:52
1
answer

How to leave the position of a fixed div according to the RaddioButton change

I have the following screen that as soon as you change the option from RaddioButton to div descends or rises. I would like to know how to leave fixed in a position. Cycle Selected: SelectingtheYear: aspx:<divid="indicador...
asked by 29.08.2017 / 15:56
1
answer

custom rangeValidation

How to make a range validator where Max is the current year + 1? I'm trying to do a dataannotation validation on my models I want to make a range validation from 1950 until current year +1 By default it is not possible to do this using the...
asked by 25.08.2017 / 15:07
2
answers

Doubt with WebRequest method get passing token

I'm trying to read the data of an application, where I send the information via get, Error: Can not send content with this type of verb. public string ConsultaPedido(string urlpedido, string NumeroPedido) { var request...
asked by 06.12.2017 / 02:14
2
answers

Receiving images in ASP.Net Core and saving in the Entity Framework

Good afternoon, Can anyone tell me how to get an image in ASP.Net Core? I have the html page that you are trying to send to the server: <form method="post" enctype="multipart/form-data" asp-controller="Produto" asp-action="ImageLoad"&...
asked by 05.12.2017 / 17:27
1
answer

Catch all the images in a sub-directory, except for one folder

I'm getting all the photos from a directory and its subsequent ones, but I do not like the "Backup" folder, how could I do that? string[] Arquivos = Directory.GetFiles(PathEx, "*.*", SearchOption.AllDirectories); I was thinking of using...
asked by 03.12.2017 / 15:44
1
answer

TRANSACTION - How to correct a transport error?

I think you can understand what I'm trying to do there: This method will make a foreach for each item in my list of moves, and send each one as a parameter to the method that will save them in the DB. I need to use a Transaction to ens...
asked by 27.09.2017 / 07:18