public static int LoginUser(string UserName, string Pass)
        {
            LinqToSQLDataContext db = new LinqToSQLDataContext();

            //Look for user in the DB

            TUser user = db.TUsers.FirstOrDefault(u => u.UserName.Equals(UserName));

            if (user is null)
            {
                return(0);
            }
            else
            {
                if (user.Pass == Pass)
                {
                    return(user.UserId);
                }
                else
                {
                    return(0);
                }
            }
        }
 partial void DeleteTUser(TUser instance);
 partial void UpdateTUser(TUser instance);
 partial void InsertTUser(TUser instance);