Questions tagged as 'c#'

1
answer

How to do foreach on each select using EF6?

Follow the code: var list = new List<String>(); list.Add("Casa"); list.Add("Apartamento"); var connection = ctx.Table.Where(x => x.Tipo== list).ToList(); My database: +=============================================+ | Tipo...
asked by 17.03.2017 / 02:40
1
answer

Why do navigation properties need to be declared as virtual? [duplicate]

I'm mapping a 1 x N relationship using a POCO class to use with the Entity Framework 6 . In this case, I have a Cart entity that has multiple Products : public class Carrinho { //Outras propriedades da classe public virtual...
asked by 15.03.2017 / 13:42
1
answer

DropDownList filled in and selected

I need to fill in a @Html.DropDownList () with the parameters of my Model and pre select one of the items. In the Model I'm getting the complete package, being: Product list in Produto and items selected through MotivosRel . M...
asked by 17.03.2017 / 14:12
2
answers

Is it possible to create mobile games with C # only? [closed]

Is it possible to create mobile apps as much as Android and IOS using only C # in visual studio? the app in question is a game     
asked by 12.05.2017 / 03:33
1
answer

How to return multiple rows with byte array from sql Server

I need to make a query in a table where the data is of type varbinary(max) , so I created the method below: public List<byte[]> preenche_fotos(string nCrm) { consql.bd_string(); SqlConnection sqlconn = new SqlCo...
asked by 11.05.2017 / 02:32
1
answer

CLOB for string and vice versa [closed]

I'm developing a web server where I have to store images in String of Base64 exchanged by desktop , mobile and website to Oracle database, but I researched a lot and saw some alternatives that are: sto...
asked by 11.05.2017 / 04:30
2
answers

How to configure the Connection String in App.config?

I would like to mount using the saved string: InstanciaSQLServer , UserSQL and PWSQL , is it possible? Example of my app.config <configSections> <sectionGroup name="userSettings" type="System.Conf...
asked by 11.05.2017 / 13:28
1
answer

Forearch loop how to use with controler

I have 6 PictureEdit in a PanelControl , and I need to run a haul on all PictureEdit so I made the following code: foreach (PictureEdit Pic in panel1.Controls) { //habilita o meno de zoom Pi...
asked by 21.05.2017 / 13:08
1
answer

How to find an object by name only?

I have 6 PictureBox , so when saving the photo in the database, saved together in which PictureBox it was. Then, when loading photos into a view, I need each photo to be displayed in its PictureBox , I query the database by...
asked by 19.05.2017 / 20:46
2
answers

File Transfer Socket c #

I have the following situation, I need to transfer an xml from one application to another via the Socket network I mounted the client and server which I will post below, The file is transmitted without problems, but files with
asked by 30.05.2017 / 23:30