protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         Db.Dispose();
     }
     base.Dispose(disposing);
 }
Ejemplo n.º 2
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (Db != null)
                {
                    Db.Dispose();
                    Db = null;
                }
            }

            base.Dispose(disposing);
        }
Ejemplo n.º 3
0
 public void Dispose()
 {
     _db?.Dispose();
     GC.SuppressFinalize(this);
 }
Ejemplo n.º 4
0
        //public async Task<double> TotalQualityPoint(string studentId, string className, string term, string sessionName)
        //{

        //    var totalPoint = await _db.ContinuousAssessments.AsNoTracking().Where(x => x.ClassName.ToUpper().Trim().Equals(className.ToUpper().Trim()) &&
        //                                                        x.TermName.ToUpper().Trim().Equals(term.ToUpper().Trim()) &&
        //                                                        x.SessionName.ToUpper().Trim().Equals(sessionName.ToUpper().Trim()) &&
        //                                                        x.StudentId.ToUpper().Trim().Equals(studentId.ToUpper().Trim()))
        //                                                        .SumAsync(c => c.QualityPoint);
        //    return totalPoint;
        //}

        //public async Task<double> TotalcreditUnit(string className)
        //{
        //    var totalCredit = await _db.AssignSubjects.AsNoTracking().CountAsync(s => s.ClassName.ToUpper().Trim().Equals(className.ToUpper().Trim()));
        //    return totalCredit * 2;
        //}



        public void Dispose()
        {
            _db?.Dispose();
        }