public void Update(Model.Store.StoreInfo entity) { using (IDbConnection conn = SqlString.GetSQLiteConnection()) { conn.Execute("UPDATE store_info SET StoreName=@StoreName,StoreLogoPath=@StoreLogoPath,StoreDes=@StoreDes,StoreSwitch=@StoreSwitch,CreateTime=@CreateTime,LastTime=@LastTime WHERE Store_Id =@Store_Id", entity); } }
public bool Insert(Model.Store.StoreInfo entity) { using (IDbConnection conn = SqlString.GetSQLiteConnection()) { int i = conn.Execute("INSERT INTO store_info(StoreName,StoreLogoPath,StoreDes,StoreSwitch,CreateTime,AlterTime)" + "VALUES(@StoreName,@StoreLogoPath,@StoreDes,@StoreSwitch,@CreateTime,@LastTime)", entity); if (i > 0) { return(true); } else { return(false); } } }