I am working on a Web API project. I am calling a repository which is responsible for the database interaction. The repository interacts with a third party data source.
I want to implement dependency injection (DI) into the repository layer to inject the dependency of the third party data source,but how can I achieve this since there are no interfaces in that third party DLL?
I use the Unity framework.
The third party DLL includes just one class:
using System;
using System.Collections.Generic;
namespace MoviesLibrary
{
public class MovieDataSource
{
public MovieDataSource();
public int Create(MovieData movie);
public List<MovieData> GetAllData();
public MovieData GetDataById(int id);
public void Update(MovieData movie);
}
}