Try the procedure described below. It should work unless the damage is really big in which case you’ll need a third party tool such as ApexSQL Recover
] to actually read the MDF file and restore the data.
Stop SQL Server -> Copy database and transaction log files to another location -> Delete original MDF and LDF files -> Start SQL Server again -> Create a new database with same name as the deleted one -> Stop SQL Server again -> overwrite newly created database files with the old one you copied earlier.
After this try putting database into EMERGANCY and SINGLE USER mode and execute DBCC CHECKDB command. If you manage to do it up to this place then you should be all good.
Important thing is to keep your original MDF and LDF files and work only with copies of these.