TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rameez Javed
NA
395
61.5k
How to get identity column value .net core using linq
Aug 6 2020 2:21 AM
Hi, I have a table named Users with Primary Key UserId (auto Incremented by 1), I have 40 record and I've deleted all, now i want to get current identity value, I'm using following code but it gives me results as null. I should be 41 as I deleted 40 rows and now current Ident is 41,
int? UsrId = _context.Users.Max(u => (int?)u.UserId);
Thanks in advance :)
Reply
Answers (
2
)
Azure Function and Database First Connection String
issue with webapi in mvc