Questions tagged as 'c#'

1
answer

How do I get the CommandText of an IQueryable?

I'm trying to get the sql generated by IQueryable , but it's returning: SELECT NULL AS [EMPTY] I expected something like: SELECT i FROM lista WHERE i > 20; How I'm doing: IDbConnection conn = new MySqlConnection("serv...
asked by 10.11.2017 / 14:10
2
answers

How do I save the DropDownList's SelectedItem value in the database?

I want to register a client and one of their attributes is sex Database: sex attribute is nvarchar ASP.NET: I'm working with a listview to insert client data <asp:SqlDataSource ID="clientes" runat="server" ConnectionString="&...
asked by 19.02.2015 / 11:43
1
answer

Entity Framework is not interpreting my settings

I have a serious problem with the Entity Framework . I have two tables: Módulos and Viaturas , both with the name of the primary key ID ( Database First ). A vehicle can have a Module, but it can also be null, the assoc...
asked by 04.09.2018 / 17:42
1
answer

How do I create a DataTable that has a dynamic column structure?

Hello, I need to create a DataTable in my MVC project that does not have predefined columns. The number of columns must be defined from the amount of data in a DB field. I have a field in my Model that is called Low Tier Id, it is an FK from...
asked by 14.08.2018 / 14:55
0
answers

How to page a query in Azure Cosmos DB?

I'm trying to page a query in Azure Cosmos DB by reading this post: > Paging through query results in Azure DocumentDB , I got to the code: public async Task <ICollection <TEntity>> GetAllPaged(int page, string colleti...
asked by 30.08.2018 / 15:04
0
answers

Error: ValueFactory attempted to access the Value property of this instance

Every time I create any Xamarin project in Visual Studio 2017 the following error appears when running the application: Erro: ValueFactory tentou acessar a propriedade Value dessa instância. Why does this error occur? What should I do to...
asked by 29.06.2018 / 18:00
0
answers

Views do not recognize @model, @ViewBag, @ViewData

I'm using Mono 5.10.1 and Visual Studio Professional for Mac (Version 7.5.4 build 3) Views do not recognize tags like @model, @ViewBag, and @ViewData, either in old projects that were originally created in Visual Studio 2017 Windows, or in a...
asked by 30.07.2018 / 14:18
1
answer

WCF Receive UTF-8 Response

I'm consuming a third party Webservice through a Console application . I get an object as a return, and on this object I need to read an attribute called ReturnMessage . However, the text is unconfigured, so it looks like thi...
asked by 25.11.2016 / 12:41
1
answer

Failure of Class Factory Recovery - Console Application

I have a'Console Application 'that connects to SQL . On other machines the application is working normally, but has one that has the Windows Server Enterprise SP2 version that is returning the following exception:    System.Runti...
asked by 14.12.2016 / 17:38
1
answer

Doubt on how to print datagridview in reportviewer

I need to print data from a DataGridViewer, which gets the products launched for sale. What is the best way to print this information in Report? I tried to use the Table component, but I can not pass the information to it, since it needs to be b...
asked by 24.10.2016 / 18:01