Exemple #1
0
        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);
            }
        }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
 public List <EntityStates> GetAll()
 {
     return(FactoryStates.GetList(base.DataContext.States.ToList()));
 }
Exemple #4
0
 public List <EntityStates> GetActives()
 {
     return(FactoryStates.GetList(base.DataContext.States.Where(p => p.Status == true).ToList()));
 }