Пример #1
0
        public CheckIn CreateRandomCheckIn(Homie owner)
        {
            var temp = new CheckIn
            {
                WithGuest = SeedDefaults.GetRandomBool(),
                Homie     = owner,
                Time      = SeedDefaults.GetRandomDateTime()
            };

            return(temp);
        }
Пример #2
0
        public Homie CreateRandomHomie()
        {
            var isHome    = SeedDefaults.GetRandomBool();
            var firstName = SeedDefaults.FirstNames[SeedDefaults.GetRandomInt()];

            var temp = new Homie
            {
                FirstName = firstName,
                LastName  = SeedDefaults.LastNames[SeedDefaults.GetRandomInt()],
                Email     = SeedDefaults.Emails[SeedDefaults.GetRandomInt()],
                IsHome    = isHome,
                // HasGuest can only be true if the Homie is home, otherwise
                // it will always be false
                HasGuest = isHome ? SeedDefaults.GetRandomBool() : false,
                NickName = firstName.ToLower() + SeedDefaults.GetRandomInt(max: 100)
            };

            return(temp);
        }