public void UpdateDailyExtra(Models.JsonModels.DailyExtraModel item) { DataBase.DeleteItem <DailyExtraModel>(item.id); DataBase.InsertItem(new DailyExtraModel { Id = item.id, comments = item.comments, long_comments = item.long_comments, popularity = item.popularity, short_comments = item.short_comments }); }
public Models.JsonModels.DailyExtraModel QueryDailyExtra(int id) { var vExtra = new Models.JsonModels.DailyExtraModel(); var extra = DataBase.Table <DailyExtraModel>().Where(d => d.Id == id).FirstOrDefault(); if (extra != null) { vExtra = new Models.JsonModels.DailyExtraModel() { id = extra.Id, comments = extra.comments, long_comments = extra.long_comments, popularity = extra.popularity, short_comments = extra.short_comments }; } return(vExtra); }