27 lines
587 B
C#
27 lines
587 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Web;
|
|||
|
|
|||
|
namespace EHEC_Server.DatabaseAccess
|
|||
|
{
|
|||
|
public class OriginAccess
|
|||
|
{
|
|||
|
public bool CreateOrigin(Origin origin)
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
using (EHEC_DBEntities ctx = new EHEC_DBEntities())
|
|||
|
{
|
|||
|
ctx.Origin.Add(origin);
|
|||
|
ctx.SaveChanges();
|
|||
|
}
|
|||
|
return true;
|
|||
|
}
|
|||
|
catch (Exception)
|
|||
|
{
|
|||
|
return false;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|