Пример #1
0
        public override bool UpdateConfig(LyciumConfig config)
        {
            var repository = _freeSql.GetRepository <LyciumConfig>();
            var item       = repository.Where(item => item.Id == config.Id).First();

            return(repository.Update(item) == 1);
        }
Пример #2
0
 /// <summary>
 /// 更新配置
 /// </summary>
 /// <param name="config"></param>
 /// <returns></returns>
 public abstract bool UpdateConfig(LyciumConfig config);
Пример #3
0
 /// <summary>
 /// 增加一个配置
 /// </summary>
 /// <param name="config"></param>
 /// <returns></returns>
 public abstract bool AddConfig(LyciumConfig config);
 public HttpStatusCode Modify(LyciumConfig config)
 {
     return(_configService.UpdateConfig(config) ? HttpStatusCode.OK : HttpStatusCode.BadRequest);
 }
 public HttpStatusCode Create(LyciumConfig config)
 {
     return(_configService.AddConfig(config) ? HttpStatusCode.OK : HttpStatusCode.BadRequest);
 }
Пример #6
0
 public override bool AddConfig(LyciumConfig config)
 {
     return(_freeSql.Insert(config).ExecuteAffrows() == 1);
 }