34 lines
908 B
C#
34 lines
908 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data.Entity;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using EnVisage.Models;
|
|
|
|
namespace EnVisage.Code.BLL
|
|
{
|
|
public class ScenarioGroupManager : ManagerBase<SystemAttribute, ScenarioGroupModel>
|
|
{
|
|
public ScenarioGroupManager(EnVisageEntities dbContext)
|
|
: base(dbContext)
|
|
{
|
|
}
|
|
protected override SystemAttribute InitInstance()
|
|
{
|
|
return new SystemAttribute { Id = Guid.NewGuid(), Type=3 };
|
|
}
|
|
|
|
protected override SystemAttribute RetrieveReadOnlyById(Guid key)
|
|
{
|
|
return DataTable.AsNoTracking().FirstOrDefault(t => t.Id == key);
|
|
}
|
|
|
|
public override DbSet<SystemAttribute> DataTable
|
|
{
|
|
get
|
|
{
|
|
return DbContext.SystemAttributes; //.Where(x => x.Type == 3);
|
|
}
|
|
}
|
|
}
|
|
} |