Exemple #1
0
        public static async Task <AggregationStatistic> Load(WaDEContext db, AggregationStatisticBuilderOptions opts)
        {
            var item = Create(opts);

            db.AggregationStatistic.Add(item);
            await db.SaveChangesAsync();

            return(item);
        }
Exemple #2
0
 public static AggregationStatistic Create(AggregationStatisticBuilderOptions opts)
 {
     return(new Faker <AggregationStatistic>()
            .RuleFor(a => a.Name, f => GenerateName())
            .RuleFor(a => a.Term, f => f.Random.Word())
            .RuleFor(a => a.Definition, f => f.Random.Words(5))
            .RuleFor(a => a.State, f => f.Address.StateAbbr())
            .RuleFor(a => a.SourceVocabularyUri, f => f.Internet.Url()));
 }