public static async Task <MethodType> Load(WaDEContext db, MethodTypeBuilderOptions opts) { var item = Create(opts); db.MethodType.Add(item); await db.SaveChangesAsync(); return(item); }
public static MethodType Create(MethodTypeBuilderOptions opts) { return(new Faker <MethodType>() .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())); }