Exemplo n.º 1
0
 public static QuizStatistic ToBllStatistic(this DalQuizStatistic dalStatistic)
 {
     return(new QuizStatistic()
     {
         Id = dalStatistic.Id,
         Correct = dalStatistic.Correct,
         DatePassed = dalStatistic.DatePassed,
         QuizId = dalStatistic.QuizId,
         UserId = dalStatistic.UserId
     });
 }
        public QuizStatistic GetById(int id)
        {
            DalQuizStatistic statistic = uow.StatisticRepository.GetById(id);

            if (statistic == null)
            {
                return(null);
            }

            return(statistic.ToBllStatistic());
        }
Exemplo n.º 3
0
        public void Create(DalQuizStatistic entity)
        {
            QuizStatistic statisticNode = new QuizStatistic()
            {
                Correct    = entity.Correct,
                DatePassed = entity.DatePassed,
                QuizId     = entity.QuizId,
                UserId     = entity.UserId
            };

            context.Set <QuizStatistic>().Add(statisticNode);
        }
Exemplo n.º 4
0
 public void Update(DalQuizStatistic entity)
 {
     throw new NotImplementedException();
 }