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));
     }
 }
        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
 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));
 }
 public Role GetRole(int id)
 {
     return(MapperHelper.MapToSameType(_roleDal.Get(p => p.Id == id)));
 }
 public Role GetById(Guid id)
 {
     return(_roleDal.Get(h => h.Id == id));
 }
 public Role Get(int id)
 {
     return(_roleDal.Get(x => x.Id == id));
 }
 public Role Get(Expression <Func <Role, bool> > filter)
 {
     return(_roleDal.Get(filter));
 }