GendrixonEvgeny
2017-11-06T18:02:44Z
Hi guys. Please, tell me how to send a query to a header or a separate page from a new table? Type SELECT count(*) FROM NEW_TABLE WHERE Statistic = "1"
Sponsor
GendrixonEvgeny
2017-11-07T19:15:43Z
GendrixonEvgeny
2017-11-12T14:24:09Z
What am I doing wrong? Posted in YAF.Data.MsSql model ADO.NET EDM -> Code First from the database. Specified connection yafnet(YAF). Created a file with the function Functions.cs in which he indicated:

using System;
using System.Linq;
using System.Net.Sockets;
using YAF.Data.MsSql;

namespace YAF
{
public static class Functions
{
public static string AccountsCount
{
get
{
using (CustomBase entity = new CustomBase())
{
int accountsCount = entity.ACCOUNTS_INFO.Count();
return accountsCount.ToString();
}
}
}
}
}

Then for the test indicated in the forum.ascx following:
<table>
<tr>
<td>Accounts:</td>
<td><%# Functions.AccountsCount %></td>
</tr>
</table>

After starting the application, I get: Screenshot_2.png

Guys. Very much I ask, prompt where was mistaken. I am just learning...

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved