You can use DBCC CheckDB (‘DATABASE_NAME’, REPAIR_REBUILD) instead of REPAIR_ALLOW_DATA_LOSS, which will not cause data loss.
You can get more info at Recover a Corrupt SQL Server MDF Database
For any cases, the best practise is to backup of your corrupt MDF database first.