public override string Translate(SqlCompilerContext context, SqlUpdate node, UpdateSection section) { switch (section) { case UpdateSection.Limit: return("ROWS"); } return(base.Translate(context, node, section)); }
public IHttpActionResult UpdateSection(UpdateSection obj) { var cc = YL.BookSection.Where(a => a.SectionlD == obj.SectionID).FirstOrDefault(); cc.SectionOrder = obj.SectionOrder; cc.SectionContent = obj.SectionContent; // cc.AddTime = DateTime.Now; cc.Remark = obj.Remark; YL.SaveChanges(); return(Content(HttpStatusCode.OK, new resultInfo { Code = 200, Message = "更新成功", Data = cc })); }
public override string Translate(SqlCompilerContext context, SqlUpdate node, UpdateSection section) { switch (section) { case UpdateSection.Entry: return("UPDATE"); case UpdateSection.Set: return("SET"); case UpdateSection.From: return("FROM"); case UpdateSection.Where: return("WHERE"); } return(string.Empty); }