Questions tagged as 'c#'

1
answer

Create a Web Api that calls another Web Api

I created an Api Web here in my work to be consumed by my Xamarin Forms project. 100% running smoothly ... Then I was informed that in fact here is used 2 web api's for security. That is, I will have to create a web-based Api ("frontend") with...
asked by 19.07.2016 / 21:37
1
answer

Required field fill

How do I enforce that between two fields, at least one of them is mandatory (is it filled out)? For example, the fields Celular and Telefone can not be saved empty, only one of them. My code: //.. } else ((txtNome.Text == "")...
asked by 30.06.2016 / 23:25
1
answer

WebAPI 2 Routing configuration web form application

For about 6 months I've been entering the MVC world, before I've used a lot of WebForms and I confess that I'm having trouble understanding how to configure the routes for a ApiController , so I noticed I can not have two equal queries (...
asked by 04.07.2016 / 15:59
1
answer

.OrderBy dynamically in Lambda

I have a field int called OrdemDosProdutosDestaque where I store the preference of the products order (My client that chooses and stores in the database). ex: 1=Aleatório 2=Preço 3=Referência 4=Categoria etc.. Model Config...
asked by 04.07.2016 / 20:25
1
answer

Map relationships with Fluent API

I have three simple classes of city, state and country. I noticed that simply declaring a property of type Estado in class Cidade the foreign key is generated correctly. I would like to know how to do these mappings in the hand, I...
asked by 05.07.2016 / 15:44
1
answer

Tcp Server stops responding

This is the following I have been watching 2 tutorial of how to do a tcp Server and a tcp Client . I had to follow everything step by step but for some reason when I start the server it stops responding, but when the client connects it from a...
asked by 26.08.2016 / 11:21
1
answer

Coordinate in map MVC [closed]

I need to show a map to the user and let them choose a location. After choosing the location I need to return the GPS coordinates (Latitude, Longitude) for the action. What is the best way to do this? Note: It can be using javascript, j...
asked by 14.07.2016 / 01:02
1
answer

Reading user information

I started studying C #, and my first program (except for hello world hahahaha) is an area calculator. In the code below, after I type the option (choosing which picture I want) the console simply closes. Console.WriteLine("Bem vind...
asked by 11.07.2016 / 23:11
1
answer

GroupControl - BackColor does not change

I am using a DevExpress GroupControl of 16.1, but when trying to change the background color (backcolor) it continues with the default color, anyone know why? or am I doing wrong? // // groupControl2 //...
asked by 09.08.2016 / 13:54
1
answer

Save data loaded from a partialView

I have PartialView with BeginCollection where I load a list of products in Dropdowns dynamic: InthisprojectIhaveaManyToManyrelationbetweenProductandVendorwhereIhavetheProdutosFornecedoresentity.IwouldliketosavetheSupplie...
asked by 22.06.2016 / 21:33