public static async Task <Epsgcode> Load(WaDEContext db, EpsgcodeBuilderOptions opts) { var item = Create(opts); db.Epsgcode.Add(item); await db.SaveChangesAsync(); return(item); }
public static Epsgcode Create(EpsgcodeBuilderOptions opts) { return(new Faker <Epsgcode>() .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.Random.AlphaNumeric(250)) .RuleFor(a => a.SourceVocabularyUri, f => f.Internet.Url())); }