public IEnumerable <Credential> Get() { using (CredentialsEntities entities = new CredentialsEntities()) { return(entities.Credentials.ToList()); } }
public Credential Get(string username) { using (CredentialsEntities entities = new CredentialsEntities()) { return(entities.Credentials.FirstOrDefault(e => e.Username == username)); } }
public Detail Get(int id) { using (CredentialsEntities entities = new CredentialsEntities()) { return(entities.Details.FirstOrDefault(e => e.IdNo == id)); } }