public static BaseRoleModel ToBaseRole(this Role role) { BaseRoleModel _result = new BaseRoleModel(); _result.Id = role.Id; _result.RoleName = role.RoleName; _result.Narration = role.Narration; _result.CreatedDate = role.CreatedDate; _result.ModifiedDate = role.ModifiedDate; return(_result); }
public static Role ToRole(this BaseRoleModel role) { Role _result = new Role(); if (role.Id.HasValue) { _result.Id = role.Id.GetValueOrDefault(); } _result.RoleName = role.RoleName; _result.Narration = role.Narration; _result.CreatedDate = role.CreatedDate; _result.ModifiedDate = role.ModifiedDate; return(_result); }