34 lines
887 B
C#
34 lines
887 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 CreditDepartmentManager : ManagerBase<CreditDepartment, CreditDepartmentModel>
|
|
{
|
|
public CreditDepartmentManager(EnVisageEntities dbContext)
|
|
: base(dbContext)
|
|
{
|
|
}
|
|
protected override CreditDepartment InitInstance()
|
|
{
|
|
return new CreditDepartment { Id = Guid.NewGuid() };
|
|
}
|
|
|
|
protected override CreditDepartment RetrieveReadOnlyById(Guid key)
|
|
{
|
|
return DataTable.AsNoTracking().FirstOrDefault(t => t.Id == key);
|
|
}
|
|
|
|
public override DbSet<CreditDepartment> DataTable
|
|
{
|
|
get
|
|
{
|
|
return DbContext.CreditDepartments;
|
|
}
|
|
}
|
|
}
|
|
} |