Beispiel #1
0
 /// <summary>
 /// Convert a ServiceLayer Role to Dal Role for insert function
 /// </summary>
 /// <param name="role">ServiceLayer Role</param>
 /// <returns>Dal Role</returns>
 public static D.Role ToDalRoleInsert(this S.Role role)
 {
     if (role == null)
     {
         return(null);
     }
     return(new D.Role
     {
         RLabel = role.RLabel
     });
 }
 /// <summary>
 /// Convert a Api Role to Service Layer Role
 /// </summary>
 /// <param name="role">Service Layer Role</param>
 /// <returns>Api Role</returns>
 public static A.Role ToApiRole(this S.Role role)
 {
     if (role == null)
     {
         return(null);
     }
     return(new A.Role
     {
         Id = role.Id,
         RLabel = role.RLabel
     });
 }
Beispiel #3
0
 /// <summary>
 /// Convert a ServiceLayer Role to Dal Role for update
 /// </summary>
 /// <param name="role">ServiceLayer Role</param>
 /// <returns>Dal Role</returns>
 public static D.Role ToDalRoleUpdate(this S.Role role)
 {
     if (role == null)
     {
         return(null);
     }
     return(new D.Role
     {
         Id = role.Id,
         RLabel = role.RLabel
     });
 }