public userViewModel(userModel user)
 {
     Id        = user.Id;
     FirstName = user.FirstName;
     LastName  = user.LastName;
     FullName  = $"{user.FirstName} {user.LastName}";
 }
        public userModel AddUser(userModel user)
        {
            int nxtId = _users.Count > 0 ? _users[_users.Count - 1].Id + 1 : 1;

            user.Id = nxtId;
            _users.Add(user);
            return(user);
        }
        private void seedData()
        {
            var u = new userModel();

            u.FirstName = "Steve";
            u.LastName  = "Fabian";
            u.Email     = "*****@*****.**";
            AddUser(u);
        }
        public userModel UpdateUser(userModel user)
        {
            var u = _users.FindIndex(x => x.Id == user.Id);

            if (u != -1)
            {
                _users[u] = user;
                return(user);
            }

            return(null);
        }
 public IEnumerable <userModel> GetUsers(userModel criteria)
 {
     return(_users);
 }
 public bool DeleteUser(userModel user)
 {
     return(_users.Remove(user));
 }