© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
6 replies
FraznoFire

Return Value on Entity Modification

Hi everyone, I'm creating a class library that contains my entity framework models and surrounding business logic for my project. I am creating a method for modifying one property of my entity. I am wondering if it is best practice to have this method return the entire object, a bool for success/fail, the changed value, or nothing.

My thinking is that since the method is being passed a reference to the entity stored in the database, I shouldn't have to return the full entity as the change has been saved, but I just don't know what sort of standard to apply in my code and if it will have any negative cosequences in the future of the codebase.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ entity framework return all objects
C#CC# / help
3y ago
✅ Return List<Entity> from method with return type of List<T> where T : Entity
C#CC# / help
3y ago
UI modification
C#CC# / help
2y ago