public async Task <JsonResult> Create(NpgSqlTable model)
        {
            model.F_Guid = Guid.NewGuid().ToString();
            using (var db = new PSqlDb())
            {
                db.NpgSqlTable.Add(model);
                await db.SaveChangesAsync();

                return(Json(new { state = true, value = "操作成功" }));
            }
        }
        public async Task <JsonResult> Edit(NpgSqlTable model)
        {
            if (!this.TryValidateModel(model))
            {
                return(Json(new { state = false, value = this.ModelState.FirstModelErrorMessage() }));
            }

            using (var db = new PSqlDb())
            {
                db.Entry(model).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(Json(new { state = true, value = "编辑成功" }));
            }
        }