KKSK@🌸🎵🌸🎵🌸
❔ cast parent to child
Have a problem about inheritance.
I have an interface that are shared between a net framework project and net 6 project.
Some of methods are called by passing classA object.
My idea was to have classB inherits classA so that in the net framework project I can call the method by passing classA.
And in the Net 6 project I can cast classA to classB (parent to child).
classA is a class with only some enum and properties.
classB have some methods that uses libraries which might not be compatible in net framework.
However, I learnt from some places that parent to child is not allow
Where some places says it is possible by using as and is keyword.
27 replies
❔ EntityFrameworkCore
The libraries I am using are
Quartz.NET
and Discord.NET
.
I am adding the discord bot with AddHostedService
.
The job I am scheduling with Quartz.Net
basically updates my database every 30 minutes.
I would like to enable the discord bot to interact return a query from the database updated by the scheduled job.
I was told to add the db with AddDbContext
.
My worry is that how do I handle concurrency? If both the job is updating it and the bot is reading it.2 replies
[git] Push a directory as a new commit
I am thinking of is it possible to create a new directory and push it as a commit to an existing repo?
So this directory originally does not have any .git folder.
Instead of cloning the entire repo and delete the directory in the first place.
Are there any commands that support this
107 replies