TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Manish Tewary
1.7k
78
577
How can I use a generic repository and unitofwork?
Apr 16 2019 1:15 PM
I have a service layer which is using unitofwork and Imapper, example given below:
//Service layer
public
interface
IEmployeeService
{
Task AddEmployee(EmployeeListResponseModel model);
}
public
class
EmployeeService : IEmployeeService
{
public
async Task AddEmployees(EmployeeListResponseModel mode)
{
public
EmployeeService (IUnitOfWork unitOfWork, IMapper mapper)
{
_unitOfWork = unitOfWork;
_mapper = mapper;
}
private
readonly
IUnitOfWork _unitOfWork;
private
readonly
IMapper _mapper;
}
Question: How can i call this service method "AddEmployees" in one of my class library project? For creating a object of class "EmployeeService" i need to create unitofwork and imapper but i do not know the best practice. Kindly help
Reply
Answers (
1
)
C# Smart Contracts with strongforce.io
Compare the Array