コード例 #1
0
 public EntityResult <Role> Get(Expression <Func <Role, bool> > filter, params string[] includeList)
 {
     try
     {
         var Role = _roleDal.Get(filter, includeList);
         if (Role != null)
         {
             return(new EntityResult <Role>(Role, "Başarılı", ResultState.Success));
         }
         return(new EntityResult <Role>(null, "Hata oluştu", ResultState.Warning));
     }
     catch (Exception ex)
     {
         return(new EntityResult <Role>(null, "Database Hatası " + ex.ToInnestException().Message, ResultState.Error));
     }
 }
コード例 #2
0
        public DataResponse Get(int id)
        {
            var role = _RoleDal.Get(i => i.ID == id);

            if (role == null)
            {
                return new DataResponse
                       {
                           Mesaj      = "Aradiginiz Rol Bulunamadi",
                           Tamamlandi = false
                       }
            }
            ;
            return(new DataResponse
            {
                Data = role,
                Mesaj = "Rol Getirildi",
                Tamamlandi = true
            });
        }
コード例 #3
0
ファイル: RoleManager.cs プロジェクト: EmirHazir/Telefon
 public Role GetById(int roleId)
 {
     return(_roleDal.Get(x => x.Id == roleId));
 }
コード例 #4
0
 public Role GetByID(int id)
 {
     return(_roleDal.Get(x => x.RoleID == id));
 }
コード例 #5
0
 public Role GetById(int roleId)
 {
     return(_roleDal.Get(u => u.RoleId == roleId));
 }
コード例 #6
0
 /// <summary>
 /// Gets the first item that fufills the filter.
 /// </summary>
 /// <param name="filter">The filter.</param>
 /// <returns></returns>
 public IRoleDataModel Get(Func <IRoleDataModel, bool> filter, IModelContext context = null)
 {
     return(dal.Get(filter, context));
 }
コード例 #7
0
 public Role Get(int id)
 {
     return(_roleDal.Get(id));
 }
コード例 #8
0
 public Role GetbyRoleName(string roleName)
 {
     return(_roleDal.Get(x => x.RoleName == roleName));
 }
コード例 #9
0
 public Role GetRole(int id)
 {
     return(MapperHelper.MapToSameType(_roleDal.Get(p => p.Id == id)));
 }
コード例 #10
0
 public Role GetById(Guid id)
 {
     return(_roleDal.Get(h => h.Id == id));
 }
コード例 #11
0
 public Role Get(int id)
 {
     return(_roleDal.Get(x => x.Id == id));
 }
コード例 #12
0
 public Role Get(Expression <Func <Role, bool> > filter)
 {
     return(_roleDal.Get(filter));
 }