예제 #1
0
        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());
        }
예제 #2
0
 public bool Save()
 {
     return(_context.SaveChanges() >= 0);
 }