oop_II-6/EHEC_Server/EHEC_Server/DatabaseAccess/ResultAccess.cs

27 lines
587 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace EHEC_Server.DatabaseAccess
{
public class ResultAccess
{
public bool CreateResult(Result result)
{
try
{
using (EHEC_DBEntities ctx = new EHEC_DBEntities())
{
ctx.Result.Add(result);
ctx.SaveChanges();
}
return true;
}
catch (Exception)
{
return false;
}
}
}
}