The above is our view model. We have used HttpPostedFileBase class to get our image. The File property contains the image on post, we can then save this image in database.Service :
In the service class we have two methods as shown below :