27 lines
572 B
C#
27 lines
572 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
|
|
namespace EHEC_Server.DataBuilder
|
|
{
|
|
public class ExamAccess
|
|
{
|
|
public bool CreateExam(Exam exam)
|
|
{
|
|
try
|
|
{
|
|
using (EHEC_DBEntities ctx = new EHEC_DBEntities())
|
|
{
|
|
ctx.Exam.Add(exam);
|
|
ctx.SaveChanges();
|
|
}
|
|
return true;
|
|
}
|
|
catch (Exception)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
} |