private domain.PrijavaStudentCollection ToDomainObjects(List <model.Prijava_Korisnik> list)
 {
     domain.PrijavaStudentCollection domainObjects = new domain.PrijavaStudentCollection();
     foreach (model.Prijava_Korisnik modelObject in list)
     {
         domain.PrijavaStudent domainObject = ToDomain(modelObject);
         domainObject.student.Id = modelObject.Korisnik_ID;
         domainObject.prijava.Id = modelObject.Prijava_ID;
         domainObjects.Add(domainObject);
     }
     return(domainObjects);
 }
        public domain.PrijavaStudentCollection GetAll()
        {
            model.LearnByPracticeDataContext    context = CreateContext();
            IQueryable <model.Prijava_Korisnik> query   = context.Prijava_Korisniks;

            domain.PrijavaStudentCollection result = new domain.PrijavaStudentCollection();
            foreach (model.Prijava_Korisnik modelObject in query)
            {
                domain.PrijavaStudent domainObject = new domain.PrijavaStudent();
                domainObject.student.Id = modelObject.Korisnik_ID;
                domainObject.prijava.Id = modelObject.Prijava_ID;
                result.Add(domainObject);
            }

            return(result);
        }