Questions tagged as 'c#'

2
answers

Losing the bar ("/")

Follow the code below: var token = "bHhETtde1UhKpwUVmTsNTpXZKyfZGK8/"; var token_string = Uri.EscapeDataString(token); //"bHhETtde1UhKpwUVmTsNTpXZKyfZGK8%2F" HttpResponseMessage response = await client.GetAsync($"{URL}/api/getall/{token_string...
asked by 19.01.2018 / 02:23
1
answer

How to do all union in LINQ?

I need to run the command below using Linq : SELECT cnes, cmp, cbo, profNome, pa, sum(quant) total FROM bpai group by pa union all select cnes, cmp, cbo, profissional, pa, sum(quant) total from bpac group by pa All fields are strin...
asked by 31.07.2017 / 20:02
1
answer

HttpWebRequest Failure

I'm trying to consume a WebService via WebRequest in C # and simply can not get any response from the server. However, via Postman I get the answer using the same parameters. code: var JsonCliente = JsonConvert.SerializeObject(c...
asked by 28.07.2017 / 15:50
2
answers

How to select the entire object, Lambda C #

I have a difficulty here in this lambda, I would like to know how I select the entire object without having to specify all its properties. As if it were a: SELECT * FROM SomeCase Without having to specify as: SELECT ID, BLA, BLE FROM Some...
asked by 02.08.2017 / 21:39
1
answer

Loading RenderAction inside _Layout

How do I load data from a model into my _Layout ? I have a default layout for all views of my project where in this layout is the div where is the user photo that is in my application at the moment, so I would have to...
asked by 28.11.2016 / 17:28
1
answer

Create new instance every time you use NavigationPage in Xamarin Forms?

Suppose I have 3 screens in Xaml and I use MasterDetailPage and NavigationPage to navigate between these screens back and forth. Page A - > Page B - > Page C - > ... I use PushAsync to do the browsing. So good ... I've implemented...
asked by 02.12.2016 / 10:55
1
answer

I can not get functions from the System.Management class

I'm not able to call some functions of the System.Management class; for my program. I've tried to using System.Management; or System.Management.ManagementObject but it also does not work. Code: static string getid() {...
asked by 24.04.2017 / 14:54
3
answers

Filter per parameter or all

I query the database using linq. I would like to filter the ID_LEAD column by the value of the filter "if there is an int (filter.code) or filter all over the world. Follow the example of how the procedure is in the bank WHERE ---- @ID_LE...
asked by 17.04.2017 / 21:52
1
answer

Browse Sites by Clicking Previous and Next Buttons [closed]

I would like to make the WebBrowser browse a list of sites by clicking on the Previous and Next button to navigate through the sites.     
asked by 20.04.2017 / 20:33
1
answer

How to set a field of type string as nullable in Code First?

I have the field descrPapel of type string and would like this field to be created as nullable , that is, accept null when doing some insert / update entity type. using System; using System.Collections.Generic; usi...
asked by 25.11.2016 / 15:49