public ActionResult <List <CityBook> > CityBook() { List <CityBook> Result = new List <CityBook>(); foreach (CM_S_CITY_BOOK item in DBContext.CM_S_CITY_BOOK) { CityBook model = EntityMapper.Map <CityBook, CM_S_CITY_BOOK>(DBContext, item); Result.Add(model); } return(Result); }
private Item GiveReward(TradeEntry entry) { if (0.01 > Utility.RandomDouble()) { switch (Utility.Random(2)) { default: case 0: return(CityBook.GetRandom()); case 1: return(new RewardSign()); } } switch (Utility.Random(2)) { default: case 1: return(RandomResource(entry)); case 2: return(ScrollOfTranscendence.CreateRandom(1, 10)); } }