I have three tables in a SQL Server 2016 db, Events, Races, Seasons. The Races table is a composite primary key of the PK for Events table and PK for Seasons table. I want to zero pad the primary key for the Events table primary key so that it is 3 digits. The desired Composite key for races would be in a format like 2018001 where 2018 is the seasonId and 001 is the eventId.
I am also using EF6 and database first approach for this. Is this a reasonably plan in first place and if so how do I set up the Events table to auto-increment with the proper zero padding?