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
David Bowie
NA
31
470
Function within Model [.NET Core 3.1 web application]
Jul 1 2020 9:25 PM
Hello,
I am new to C# and .NET CORE. My task is to write a globally accessible function that has no parameters and returns a calculated integer value from SQL database. In ideal world I would like to be able to retrieve this value by referring to it in the format of
Sales.GetTotal()
from within any controller. In my case Sales is the model name and GetTotal() is a function within the Sales model that sends a call to database server and retrieves calculated total. How is this achieved?
I am writing a .NET Core 3.1 web application.
Thank you in advance for the pointers.
Reply
Answers (
1
)
Task export on MSProject with error on blank/empty tasks
Regex replace, maximum length and unicode support