Beispiel #1
0
 public void TestMethod()
 {
     Models.Models.User user = new Models.Models.User()
     {
         UserName = "******"
     };
     Model.UsersTables.Add(user);
     Model.SaveChanges();
 }
Beispiel #2
0
        public async Task <Models.Models.User> GetUser(string name)
        {
            var result = await users.Search(name, null);

            var userInsta = result.Data.FirstOrDefault();
            var user      = new Models.Models.User();

            if (userInsta == null)
            {
                return(user);
            }
            user.Image    = userInsta.ProfilePicture;
            user.Id       = userInsta.Id.ToString();
            user.UserName = userInsta.Username;
            user.FullName = userInsta.FullName;
            return(user);
        }