示例#1
0
        public async Task <IActionResult> OnPostArchive()
        {
            try
            {
                if (ModelState.IsValid == false)
                {
                    return(Page());
                }
                string cs = _config.GetConnectionString("Default");
                await _CoffeeData.ArchiveCoffee(UpdateCoffeeDetails.CoffeeID);

                return(RedirectToPage("./Index"));
            }
            catch (Exception ex)
            {
                Log.Error(ex.ToString());
                throw new Exception(ex.ToString());
            }
        }