Questions tagged as 'c#'

2
answers

Association 1 to 1 Entity

I have a relationship between Address and Academy where 1 address has 1 gym, and 1 gym has 1 address. Academy Class: public class Academia { [Key] public int AcademiaID { get; set; } ... //relacionamentos public int Ende...
asked by 19.01.2017 / 03:40
1
answer

How do I know if the customer sent me something?

I made this code here following some tutorials on the internet. buttonAbrirConexão.Enabled = false; TcpListener servidor = new TcpListener(6554); servidor.Start(); while(true) { Thread.Sleep(2500); if(servidor.Pending()) { Mess...
asked by 28.08.2016 / 02:39
1
answer

What if I want to send and receive a "package"?

I ran a mini server test online and everything worked fine, the problem is that I want to send integers, booleans, strings, etc ... So far I only know how to send string, how to take the first steps? For now I'm using this: string dataFromServ...
asked by 28.08.2016 / 18:01
1
answer

InlineString vs String - what's the difference?

In creating some spreadsheets with OpenXML, I came to doubt the difference between: CellValues.InlineString CellValues.String Is there any practical difference at the time of inserting texts (eg "hello world", "stackoverfl...
asked by 05.09.2016 / 18:20
1
answer

ConfigurationManager.AppSettings returning different values in different environments

I do not know what to post to help with the question, so if you want to know more, just talk in the comments. In web.config , within appSettings , has the tag <add key="apiManagerUrl" value="http://minha-api.azurewebsites.net/api...
asked by 18.06.2016 / 00:13
1
answer

Estimated travel time using dbgeography

Is it possible to calculate the estimated travel time between two locations using dbgeography in C #?     
asked by 21.06.2016 / 20:49
1
answer

How to create master-detail form using a ViewModel

I have a viewmodel in my project. Inside it I have two entities which are a list of items. I'm doing the data-editing logic for these entities that are within the viewmodel . I have 5 entities in all. The ones that are not a list, I get th...
asked by 20.06.2016 / 04:44
2
answers

C # - How to close the login form (initial form of the program) after calling another form?

I've been able to do the whole database part of the login form, so if the user enters login / password with data that is in the database, he can access. But when I open the other form, the login does not close and the most I could do was hide...
asked by 30.11.2015 / 00:41
1
answer

concatenate files in C #

Good morning I have several txt files in the same directory-frames-1, frames-2 ..., I just need to create one file. but with an aggravating fact that each file will be a column of the final file. as if it were an array. where each file is arr...
asked by 14.12.2015 / 16:06
2
answers

Using distinct with Entity Framework

I have an object with a structure something like this: Date Description I'm thinking a distinct() in the description field because the records are ridiculously repeated. The question is, does distinct() only consider th...
asked by 17.12.2015 / 17:35