Example #1
0
        public async Task <List <Advertisement> > Get(int id)
        {
            //return "value";
            IAdvertisementServices adServices = new AdvertisementServices();

            return(await adServices.Query(d => d.Id == id));
        }
Example #2
0
        public CommonRtnEntity Post([FromBody] UserInfo userInfo)
        {
            IAdvertisementServices advertisementServices = new AdvertisementServices();
            int             userID  = advertisementServices.Add(userInfo);
            CommonRtnEntity rtnInfo = new CommonRtnEntity()
            {
                Success = userID > 0,
                Data    = userID,
                Message = "添加成功!"
            };

            return(rtnInfo);
        }
Example #3
0
        public CommonRtnEntity GetById(int id)
        {
            string aa = null;
            string bb = aa ?? "666";

            IAdvertisementServices advertisementServices = new AdvertisementServices();
            List <UserInfo>        list    = advertisementServices.Query(d => d.ID == id);
            CommonRtnEntity        rtnInfo = new CommonRtnEntity()
            {
                Success = true,
                Data    = list,
                Message = "查询成功!"
            };

            return(rtnInfo);
        }
Example #4
0
        public int Get(int i, int j)
        {
            IAdvertisementServices advertisementServices = new AdvertisementServices();

            return(advertisementServices.Sum(i, j));
        }
        public List <Advertisement> Get(int id)
        {
            IAdvertisementServices advertisementServices = new AdvertisementServices();

            return(advertisementServices.Query(d => d.Id == id));
        }