Exemple #1
0
 /// <summary>
 /// Récupère un role selon son nom.
 /// </summary>
 /// <param name="roleName"></param>
 /// <returns></returns>
 RoleDTO IRoleEngine.Get(string roleName)
 {
     using (CarRentalEntities context = new CarRentalEntities())
     {
         try
         {
             return(roleMapping.MapToRoleDTO(context.usp_Role_GET(roleName).FirstOrDefault()));
         }
         catch (Exception)
         {
             throw;
         }
     }
 }