1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- using System;
- using Lottomat.Application.Entity.InformationManage;
- using Lottomat.Application.IService.InformationManage;
- using Lottomat.Data.Repository;
- using Lottomat.Util.WebControl;
- using System.Collections.Generic;
- using System.Linq;
- using System.Linq.Expressions;
- namespace Lottomat.Application.Service.InformationManage
- {
-
-
-
-
-
-
-
- public class ToolsService : RepositoryFactory<ToolsEntity>, IToolsService
- {
- #region 获取数据
-
-
-
-
-
-
- public IEnumerable<ToolsEntity> GetPageList(Pagination pagination, string queryJson)
- {
- return this.BaseRepository().FindList(pagination);
- }
- public IEnumerable<ToolsEntity> GetList(Expression<Func<ToolsEntity, bool>> condition)
- {
-
-
-
- return this.BaseRepository().FindList(condition);
- }
-
-
-
-
-
- public IEnumerable<ToolsEntity> GetList(string queryJson)
- {
- return this.BaseRepository().IQueryable().ToList();
- }
-
-
-
-
-
- public ToolsEntity GetEntity(string keyValue)
- {
- return this.BaseRepository().FindEntity(keyValue);
- }
- #endregion
- #region 提交数据
-
-
-
-
- public void RemoveForm(string keyValue)
- {
- this.BaseRepository().Delete(keyValue);
- }
-
-
-
-
-
-
- public void SaveForm(string keyValue, ToolsEntity entity)
- {
- if (!string.IsNullOrEmpty(keyValue))
- {
- entity.Modify(keyValue);
- this.BaseRepository().Update(entity);
- }
- else
- {
- entity.Create();
- this.BaseRepository().Insert(entity);
- }
- }
- #endregion
- }
- }
|