示例#1
0
        public async Task <IHttpActionResult> GettAdsLog(int id)
        {
            tAdsLog tAdsLog = await db.tAdsLogs.FindAsync(id);

            if (tAdsLog == null)
            {
                return(NotFound());
            }

            return(Ok(tAdsLog));
        }
示例#2
0
        public async Task <IHttpActionResult> PostAdsLog(tAdsLog tAdsResult)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            db.tAdsLogs.Add(tAdsResult);
            var result = await db.SaveChangesAsync();

            return(Ok(result));
        }