© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
161 replies
Mastervoliumpl

Add an object to list

Hello, I am currently working on a school project. I currently have a Models folder, BLL in which there is Interfaces and Repositories.

Now I'm trying to create a blog post. However, the list that keeps all the blog posts is in PostRepo. How would I do it so that every time a blogpost or any other inherited class from post will save its "post" in that list? I attached pictures for reference.
image.png
image.png
image.png
image.png
image.png
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
Next page

Similar Threads

✅ Cannot convert List<MyClass> to List<object>
C#CC# / help
9mo ago
✅ ToString of a list of an object
C#CC# / help
3y ago
Adding an object to a list with a method
C#CC# / help
15mo ago