public EntityStates GetByState(string State) { var data = base.DataContext.States.Where(p => p.StateName == State); if (data.Count() == 1) { return(FactoryStates.Get(data.Single())); } else { return(null); } }
public EntityStates Get(int Id) { var data = base.DataContext.States.Where(p => p.PK_StateID == Id); if (data.Count() == 1) { return(FactoryStates.Get(data.Single())); } else { return(null); } }
public List <EntityStates> GetAll() { return(FactoryStates.GetList(base.DataContext.States.ToList())); }
public List <EntityStates> GetActives() { return(FactoryStates.GetList(base.DataContext.States.Where(p => p.Status == true).ToList())); }