public Entities GetAll() { Entities entities = new Entities(); try { List <Entity> entityList = _persist.SelectAll <Entity>(); foreach (Entity e in entityList) { entities.list.Add(e); } this._persist.InsertCache(entities); } catch (Exception err) { throw new Exception(Error.ERR_REFM_BADREQUEST, err); } return(entities); }
public UserProfiles GetAll() { UserProfiles users = new UserProfiles(); try { List <UserProfile> userList = _persist.SelectAll <UserProfile>(); foreach (UserProfile u in userList) { users.list.Add(u); } this._persist.InsertCache <UserProfiles>(users); } catch (Exception err) { throw new Exception(Errors.ERR_PROFILEM_PROFILES_NOT_FOUND, err); } return(users); }