public async Task <IActionResult> CreatProduct(CreatProduct request) { var creat = await _productConnectAPI.CreatProduct(request); return(Json(new { status = true })); }
public async Task <IActionResult> CreatProduct(CreatProduct request) { var creat = await _productConnectAPI.CreatProduct(request); if (creat == true) { var annount = new AnnouncementViewModel() { UserName = User.Identity.Name, DeCripstion = "Create Product successfull ", Content = "Creat Product", DateCreated = DateTime.Now, }; await _hubContext.Clients.All.SendAsync("ReceiveMessage", annount); } return(Json(new { status = true })); }
public async Task <IActionResult> Creat(CreatProduct request) { var create = await _productConnectAPI.CreatProduct(request); return(RedirectToAction("Index", "Home")); }