You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
694 B
C#

using Server.Factory;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using VM;
namespace Web
{
public class TrainingBLL
{
public static TrainExamVM GetTrainExam(int TrainExamId)
{
TrainExamVM model = new TrainExamVM();
if (!TrainingCaches.TrainExamCache.ContainsKey(TrainExamId))
{
//缓存没有时,从数据库加载
model = SvrFactory.Instance.TrainingSvr.GetTrainExam(TrainExamId);
}
else
{
model = TrainingCaches.TrainExamCache[TrainExamId];
}
return model;
}
}
}