public int GetallCustomerCount() { HomeContext context = HttpContext.RequestServices.GetService(typeof(RMG.Models.HomeContext)) as HomeContext; return(context.GetallCustomerCount()); }