Hello OP ,
Please avoid to ask people about code directly . Because Its not a good practive for Novice programmer.
We would like read this link and try to build code for your requirement.
Connect C# to MySQL[
^]
And If you come across any issues / question you can reply to this thread.
Hope this helps , If yes then plz accept and vote the answer. Any queries / questions on this are always welcome.
Thanks & Regards
RDBurmon.Sr.Software Engineer