12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- using Lottomat.Application.Entity.PublicInfoManage;
- using Lottomat.Application.IService.PublicInfoManage;
- using Lottomat.Data.Repository;
- using Lottomat.Util.Extension;
- using System.Collections.Generic;
- using System.Linq;
- namespace Lottomat.Application.Service.PublicInfoManage
- {
-
-
-
-
-
-
-
- public class EmailCategoryService : RepositoryFactory<EmailCategoryEntity>, IEmailCategoryService
- {
- #region 获取数据
-
-
-
-
-
- public IEnumerable<EmailCategoryEntity> GetList(string UserId)
- {
- var expression = LinqExtensions.True<EmailCategoryEntity>();
- expression = expression.And(t => t.CreateUserId == UserId);
- return this.BaseRepository().IQueryable(expression).ToList();
- }
-
-
-
-
-
- public EmailCategoryEntity GetEntity(string keyValue)
- {
- return this.BaseRepository().FindEntity(keyValue);
- }
- #endregion
- #region 提交数据
-
-
-
-
- public void RemoveForm(string keyValue)
- {
- this.BaseRepository().Delete(keyValue);
- }
-
-
-
-
-
-
- public void SaveForm(string keyValue, EmailCategoryEntity emailCategoryEntity)
- {
- if (!string.IsNullOrEmpty(keyValue))
- {
- emailCategoryEntity.Modify(keyValue);
- this.BaseRepository().Update(emailCategoryEntity);
- }
- else
- {
- emailCategoryEntity.Create();
- this.BaseRepository().Insert(emailCategoryEntity);
- }
- }
- #endregion
- }
- }
|