Q
Q
Quber2014-08-13 07:32:09
ASP.NET
Quber, 2014-08-13 07:32:09

How to count the number of selected records from a database in C# ASP.NET?

Good day to all!
Actually a subject. Interested in solutions on the frontend side (razor view type) and backend in the controller somewhere.
I am sampling like this:

var files = from m in db.Files select m;
files = files.Where(s => s.TreatmentId == id);
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
codecity, 2014-08-13
@Quber

files.Count() obviously

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question