/// <summary> /// Get a role with identifier /// </summary> /// <param name="id"></param> /// <param name="objContex"></param> /// <returns></returns> public static Role Get(short id, ModelUnibookContainer objContex) { Role role = null; try { role = RoleDal.Get(id, objContex); } catch (Exception ex) { throw ex; } return(role); }
/// <summary> /// Get a role with identifier /// </summary> /// <param name="id"></param> /// <param name="objContex"></param> /// <returns></returns> public static RoleDto GetDto(short id, ModelUnibookContainer objContex) { RoleDto roleDto = null; try { Role role = RoleDal.Get(id, objContex); roleDto = new RoleDto(); roleDto.RoleId = role.RoleId; roleDto.Name = role.Name; roleDto.Deleted = roleDto.Deleted; } catch (Exception ex) { throw ex; } return(roleDto); }