bug1
This commit is contained in:
parent
91bd820134
commit
65355d1a37
@ -1,27 +1,15 @@
|
||||
using AngleSharp.Text;
|
||||
using asg_form.Controllers.Hubs;
|
||||
using asg_form.Controllers.Store;
|
||||
using Manganese.Array;
|
||||
using Manganese.Array;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using NPOI.HPSF;
|
||||
using System.Security.Claims;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
|
||||
using System.Web;
|
||||
using System.Net.NetworkInformation;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Org.BouncyCastle.Utilities.Encoders;
|
||||
|
||||
namespace asg_form.Controllers.Teamregistration
|
||||
{
|
||||
public class ComformDB
|
||||
{
|
||||
public long id { get; set; }
|
||||
public string chinaname { get; set; }
|
||||
public int user_id { get; set; }
|
||||
public int sex { get; set; }
|
||||
@ -201,9 +189,18 @@ namespace asg_form.Controllers.Teamregistration
|
||||
{
|
||||
using (TestDbContext sub = new TestDbContext())
|
||||
{
|
||||
var query = sub.T_Comform.AsQueryable();
|
||||
query = query.Where(n => n.user_id == userid);
|
||||
return query.OrderByDescending(a => a.user_id).ToList();
|
||||
var query = sub.T_Comform.AsQueryable()
|
||||
.Where(n => n.user_id == userid)
|
||||
.OrderByDescending(a => a.user_id);
|
||||
|
||||
var result = await query.ToListAsync();
|
||||
|
||||
if (result.Count == 0)
|
||||
{
|
||||
return new JsonResult(new { });
|
||||
}
|
||||
|
||||
return new JsonResult(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user