public ResponseMessageWrap <int> Update([FromBody] Popedom popedom) { return(new ResponseMessageWrap <int> { Body = PopedomService.Update(popedom) }); }
public ResponseMessageWrap <int> Insert([FromBody] Popedom popedom) { return(new ResponseMessageWrap <int> { Body = PopedomService.Insert(popedom) }); }
/// <summary> /// Finds the user by subject identifier. /// </summary> /// <param name="subjectId">The subject identifier.</param> /// <returns></returns> public TestUser FindBySubjectId(string subjectId) { TestUser testUser = new TestUser(); Popedom popedom = dbContext.Popedom.Where(c => c.Userid == subjectId).FirstOrDefault(); if (popedom != null) { testUser.SubjectId = popedom.Userid; testUser.Claims = new List <Claim>() { new Claim("name", popedom.Username), new Claim("sysId", popedom.Userid), new Claim("nationality", "中国") }; } return(testUser); }
/// <summary> /// Finds the user by username. /// </summary> /// <param name="username">The username.</param> /// <returns></returns> public TestUser FindByUsername(string username) { //dbContext.Popedom.AsEnumerable().(c => c.LoginName == username); TestUser testUser = new TestUser(); var queryable = dbContext.Popedom.Select(c => c.LoginName == username); Popedom popedom = dbContext.Popedom.FirstOrDefault(c => c.Username == username); if (popedom != null) { testUser.SubjectId = popedom.Userid; testUser.Claims = new List <Claim>() { new Claim("name", popedom.Username), new Claim("sysId", popedom.Userid), new Claim("nationality", "中国") }; } return(testUser); }
public int Update(Popedom popedom) { return(PopedomRepository.Update(popedom)); }
public int Insert(Popedom popedom) { return(PopedomRepository.Insert(popedom)); }