public async Task <bool> CheckExistFavoriteUserModel(FavoriteModelDTO model)
 {
     using (var uof = unitOfWorkFactory.CreateUnitOfWork())
     {
         return(await uof.FavoriteModelRepository.
                CheckExistFavoriteUserModel(favoriteModelMapper.Map(model)));
     }
 }
 public async Task <bool> DeleteUserFavoriteModel(FavoriteModelDTO favoriteModel)
 {
     using (var uof = unitOfWorkFactory.CreateUnitOfWork())
     {
         return(await uof.FavoriteModelRepository.
                DeleteUserFavoriteModel(favoriteModelMapper.Map(favoriteModel)));
     }
 }
 public UserFavoriteModel Map(FavoriteModelDTO modelDTO)
 {
     return(new UserFavoriteModel
     {
         ModelId = modelDTO.ModelId,
         UserId = modelDTO.UserId
     });
 }