コード例 #1
0
        static public Semaine getCurrentSemaineWD()
        {
            Semaine semaine;

            using (SemaineRepository semainerepo = new SemaineRepository())
            {
                semaine = semainerepo.GetCurrent();
            }
            return(semaine);
        }
コード例 #2
0
        static public Semaine getCurrentSemaine()
        {
            //List<Semaine> lists;
            Semaine semaine;

            using (SemaineRepository semainerepo = new SemaineRepository())
            {
                //lists = (List<Semaine>)semainerepo.GetAll();
                //foreach (var item in lists)
                //{
                //    semainerepo.context.Entry(item).State = EntityState.Detached;
                //}
                semaine = semainerepo.GetCurrent();
                semainerepo.context.Entry(semaine).State = EntityState.Detached;
            }

            //return lists.MaxBy(s => s.SemaineId);
            return(semaine);
        }