© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
3 replies
Alex

Help refactor service

Hi! I have data of many
Station
Station
models. Their information updates every ~60 minutes. I need to store current data in cache (Redis) and history of data in database (MongoDb). I get data from 3rd party api and I have method that sends http request to it. Right now I have method to fetch data from 3rd party api, method to map it and method to save it to cache and get it from cache. I want to create new methods to save and get data from MongoDb. Should I create these methods in one service or in separate? What the best way to organize them?
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

❔ Refactor help`
C#CC# / help
4y ago
ServiceFabric DataContract exception serialization and ServiceProxy.Create
C#CC# / help
2y ago
✅Refactor C# code
C#CC# / help
2y ago
ServiceProvider not providing registered service [Answered]
C#CC# / help
4y ago