Exemple #1
0
            public static CustomerEntity Create(string user, DateTime on,
                                                string name,
                                                string avatar     = "https://cdn.iconscout.com/icon/free/png-256/avatar-375-456327.png",
                                                bool defaultValue = true)
            {
                var result = new CustomerEntity
                {
                    Name       = name,
                    CreatedBy  = user,
                    ModifiedBy = user,
                    CreatedOn  = on,
                    ModifiedOn = on,
                    Avatar     = avatar
                };

                result.Validate();
                if (defaultValue)
                {
                    DefaultValues(result, on, user);
                }

                return(result);
            }