EnVisageOnline/Beta/Source/EnVisage/Code/BLL/UOMManager.cs

34 lines
770 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 UOMManager : ManagerBase<UOM, UOMModel>
{
public UOMManager(EnVisageEntities dbContext)
: base(dbContext)
{
}
protected override UOM InitInstance()
{
return new UOM { Id = Guid.NewGuid() };
}
protected override UOM RetrieveReadOnlyById(Guid key)
{
return DataTable.AsNoTracking().FirstOrDefault(t => t.Id == key);
}
public override DbSet<UOM> DataTable
{
get
{
return DbContext.UOMs;
}
}
}
}