Esempio n. 1
0
        public virtual List <string> GetAnimals()
        {
            //_fanimalRepository.Delete(ainiaml);

            //_fanimalRepository.Delete(p=>p.Id==22);
            var animalnames = _fanimalRepository.GetAll().Select(p => p.Name).ToList();

            return(animalnames);
        }
Esempio n. 2
0
        /// <summary>
        /// 测试来自mysql库的查询
        /// </summary>
        /// <returns>名称</returns>
        public List <string> GetPeople()
        {
            var entity = new Person()
            {
                PersonName = "张锋"
            };
            var eny         = _fpersonRepository.InsertAndGetEntityAsync(entity);
            var peopleNames = _fpersonRepository.GetAll().Select(p => p.PersonName).ToList();

            return(peopleNames);
        }