public void GetSerifsTest() { SerifsController serif = new SerifsController(); Random rand = new Random(); var serifDatas = serif.GetSerifs().Where(e => e.Name == "里美").ToArray(); var serifData = serifDatas[rand.Next(serifDatas.Length)]; serifData.IsNotNull(); Console.WriteLine(serifData.Id); Console.WriteLine(serifData.Text); Console.WriteLine(serifData.Type); }
private IEnumerable <SerifData> GetSerif(string name, SerifType type) { return(serifsController.GetSerifs().Where(e => e.Name == name).Where(e => e.Type == type)); }