Beispiel #1
0
        public List <InstallationModel> GetAll()
        {
            List <InstallationModel> ilist = null;

            try
            {
                ilist = new List <InstallationModel>();
                IQueryable <Installation> query = context.Installation;
                ilist = ConvertInstallation.ConvertToList(query);
                log.Info("InstallationEntities wurden geladen.");
            }
            catch (Exception exp)
            {
                log.Error("InstallationEntities konnten nicht geladen werden.");
                throw new DalException("InstallationEntities konnten nicht geladen werden.", exp);
            }
            return(ilist);
        }
Beispiel #2
0
        public List <InstallationModel> GetByCustomerId(int customerid)
        {
            List <InstallationModel> ilist = null;

            try
            {
                IQueryable <Installation> query = from result in context.Installation
                                                  where result.customerid.Equals(customerid)
                                                  select result;
                ilist = ConvertInstallation.ConvertToList(query);
                log.Info("Installations von Customer wurden geladen.");
            }
            catch (Exception exp)
            {
                log.Error("Installations von Customer konnten nicht geladen werden.");
                throw new DalException("Installation von Customer konnten nicht geladen werden.", exp);
            }

            return(ilist);
        }