示例#1
0
        public bool Insert()
        {
            var model = new XCodeTestModel();

            model.Guid = Guid.NewGuid().ToString();
            return(model.Insert() > 0);
        }
示例#2
0
        public bool Update(string guid, string content)
        {
            var model = XCodeTestModel.FindByGuid(guid);

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