pedropaf/saas-ecom-my-notes-sample

MaxNotes Counter

Opened this issue · 1 comments

Issue with table count
userNotes value is always 1 regardless of table entries, which then always returns < MaxNotes allowing unlimited entries.

capture

SOLUTION:
var userNotes = await _db.Users.Where(u => u.Id == userId).Include(u => u.Notes).SelectMany(u => u.Notes).CountAsync();