public async Task <List <Advertisement> > Get(int id) { //return "value"; IAdvertisementServices adServices = new AdvertisementServices(); return(await adServices.Query(d => d.Id == id)); }
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); }
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); }
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)); }