How to create service of a procedure have no return type.
By Zaif Ullah   Posted on September-22-2018 685
.Net
In Itableservices
void UpdateProductViews(int proId);
in tbaleservice
public void UpdateProductViews(int proId)
{
try
{
using (DbContext context = new saudiphonedbEntities())
{
context.Database.ExecuteSqlCommand("UpdateProductViews " + proId);
}
}
catch (Exception ex)
{
}
}
in controller
_productService.UpdateProductViews(productId);
By zaifullah489-000001   22-Sep-2018
Views 685