public static UserInfoDto DynamicToDto(dynamic data) { var model = new UserInfoDto { Id = data.Id, Email = data.Email, FirstName = data.FirstName, LastName = data.LastName, IsObsolete = data.IsObsolete, UserName = data.UserName, Role = data.Role }; return(model); }
public static ViewUserInfoModel ToDto(UserInfoDto data) { return(new ViewUserInfoModel { Email = data.Email, FirstName = data.FirstName, Id = data.Id, IsObsolete = data.IsObsolete, LastName = data.LastName, RoleId = data.RoleId, UserName = data.UserName, BirthDate = data.BirthDate, PhoneNumber = data.PhoneNumber, }); }