public async Task <string> MemberCreate(string LastName, string FirstName, string Permission) { CreatePersonResult membertemp = await faceclient.CreatePersonAsync(ConfigurationManager.AppSettings["MemberGroupId"], null, LastName + " " + FirstName, Permission); MemberInfo entity = new MemberInfo(); entity.LastName = LastName; entity.FirstName = FirstName; entity.MemberId = membertemp.PersonId; entity.Permission = Permission; db.MemberInfos.Add(entity); db.SaveChanges(); return(membertemp.PersonId.ToString()); }
public bool Save() { return(_context.SaveChanges() >= 0); }