ITimeU.Models.AthleteClassModel.GetOrCreate C# (CSharp) 메소드

GetOrCreate() 공개 정적인 메소드

public static GetOrCreate ( string name ) : AthleteClassModel
name string
리턴 AthleteClassModel
        public static AthleteClassModel GetOrCreate(string name)
        {
            AthleteClass athleteClassDb = null;

            try
            {
                athleteClassDb = getDbEntry(name);
            }
            catch (InvalidOperationException)
            {
                athleteClassDb = createDbEntry(name);
            }

            return new AthleteClassModel(athleteClassDb);
        }