47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using EnVisage.Models;
|
|
using System.Data.Entity;
|
|
|
|
namespace EnVisage.Code.BLL
|
|
{
|
|
public class GLAccountManager : ManagerBase<GLAccount, GLAccountModel>
|
|
{
|
|
public GLAccountManager(EnVisageEntities dbContext) : base(dbContext)
|
|
{
|
|
}
|
|
|
|
public override GLAccount Save(GLAccountModel model)
|
|
{
|
|
GLAccount glAccount = null;
|
|
glAccount = base.Save(model);
|
|
return glAccount;
|
|
}
|
|
|
|
public GLAccountModel LoadWithChildCollections(Guid? value, bool isReadOnly = true)
|
|
{
|
|
GLAccountModel result = (GLAccountModel)base.Load(value, isReadOnly);
|
|
return result;
|
|
}
|
|
|
|
protected override GLAccount InitInstance()
|
|
{
|
|
return new GLAccount { Id = Guid.NewGuid() };
|
|
}
|
|
|
|
protected override GLAccount RetrieveReadOnlyById(Guid key)
|
|
{
|
|
return DataTable.AsNoTracking().FirstOrDefault(t=>t.Id == key);
|
|
}
|
|
|
|
public override System.Data.Entity.DbSet<GLAccount> DataTable
|
|
{
|
|
get
|
|
{
|
|
return DbContext.GLAccounts;
|
|
}
|
|
}
|
|
}
|
|
} |