public void TestDel() { var role = new Role { Name = "即将删除" + _time, CreateTime = DateTime.Now, OrgId = 1 }; _app.AddOrUpdate(role); Console.WriteLine("new role:" + role.Id); _app.Delete(role.Id); }
public string Add(Role role) { try { _app.AddOrUpdate(role); } catch (Exception ex) { BjuiResponse.statusCode = "300"; BjuiResponse.message = ex.Message; } return(JsonHelper.Instance.Serialize(BjuiResponse)); }
public string Add([FromBody] JObject obj) { try { _app.AddOrUpdate(obj); } catch (Exception ex) { Result.Status = false; Result.Message = ex.Message; } return(JsonHelper.Instance.Serialize(Result)); }