Пример #1
0
 public List<Status> GetAllDDL()
 {
     Status entity = new Status() { IdStatus=-1,Name="Selecciona..."};
     List<Status> entityList = GetAll();
     entityList.Insert(0, entity);
     return entityList;
 }
Пример #2
0
        public List<Status> GetAll()
        {
            TCRepositoryDataContext context = DataBaseUtils.GetContext();
            List<tbl_Status> dbListStatus = context.tbl_Status.ToList();

            List<Status> entityList = new List<Status>();

            foreach (var drRow in dbListStatus)
            {
                Status entity = new Status();
                AssignDataObjectToEntity(drRow, ref entity);
                entityList.Add(entity);
            }
            return entityList;
        }
Пример #3
0
 private void AssignDataObjectToEntity(tbl_Status dbRole, ref Status entity)
 {
     entity.IdStatus = dbRole.IdStatus;
     entity.Name = dbRole.Name;
 }