我有一张桌子
ID|值
VALUE 一个可能值为 0 - 1 的整数字段。如何返回每个值的计数?
我正在尝试在下面的视图中返回结果 - repository(repository.paths)
namespace CessationPath.Controllers
{
public class SampleController : Controller
{
private IPathsRepository repository;
public SampleController(IPathsRepository repoParam) {
repository = repoParam;
}
//
// GET: /Sample/
public ActionResult Index()
{
return View(repository.Paths );
}
}
}