public bool Insert() { var model = new XCodeTestModel(); model.Guid = Guid.NewGuid().ToString(); return(model.Insert() > 0); }
public bool Update(string guid, string content) { var model = XCodeTestModel.FindByGuid(guid); model.Content = content; model.EditDate = DateTime.Now; return(model.Update() > 0); }
public bool Delete(string guid) { //return XCodeTestModel.Delete(new[] { "Guid" }, new object[] { guid }) > 0; return(XCodeTestModel.FindByGuid(guid).Delete() > 0); }
public List <XCodeTestModel> GetModelList(int count) { return(XCodeTestModel.Search(string.Empty, "Guid ASC", 0, count)); }