35 lines
789 B
C#
35 lines
789 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 ExpenditureManager : ManagerBase<Expenditure, ExpenditureModel>
|
|
{
|
|
public ExpenditureManager(EnVisageEntities dbContext)
|
|
: base(dbContext)
|
|
{
|
|
}
|
|
|
|
protected override Expenditure InitInstance()
|
|
{
|
|
return new Expenditure { Id = Guid.NewGuid() };
|
|
}
|
|
|
|
protected override Expenditure RetrieveReadOnlyById(Guid key)
|
|
{
|
|
return DataTable.AsNoTracking().FirstOrDefault(t => t.Id == key);
|
|
}
|
|
|
|
public override DbSet<Expenditure> DataTable
|
|
{
|
|
get
|
|
{
|
|
return DbContext.Expenditures;
|
|
}
|
|
}
|
|
}
|
|
} |