public static bool UpdateComicHistory(this SqlContext context, HistoryClass mo) { context.History.Update(mo); var count = context.SaveChanges(); return(count == 1); }
public static bool UpdateComicHistory(HistoryClass mo) { using (var conn = GetDbConnection()) { var count = conn.Execute("UPDATE HistoryClass SET lookTime=?,title=?,up=?,image=? WHERE _aid=?;", DateTime.Now.ToLocalTime(), mo.title, mo.up, mo.image, mo._aid); if (count == 1) { return(true); } else { return(false); } } }
public static bool AddCommicHistory(HistoryClass mo) { using (var conn = GetDbConnection()) { // 受影响行数。 var count = conn.Insert(mo); if (count == 1) { return(true); } else { return(false); } } }