Hello. I have been messing with this for hours and I'm out of ideas. I get the following message when trying to use a function in another class. The error is:
Error 1 An object reference is required for the non-static field, method, or property 'WebAPIAuthenitication.Security.IdentityStore.IsValidUser(DrivingSticker.Models.User)' E:\DrivingSticker\DrivingSticker\Controllers\UsersController.cs 22 17 DrivingSticker
IdentityStore.cs
using System;
using System.Collections.Generic;
using System.Linq;
using DrivingSticker.Models;
namespace WebAPIAuthenitication.Security
{
public class IdentityStore
{
private Dictionary<string, string> users = new Dictionary<string, string> { { "Alex", "@lex" }, { "Cruz", "cruz007" }, {"Sanjay", "pass"} };
private DSDataContext db = new DSDataContext();
public bool IsValidUser(User user)
...
Go to the complete details ...