public async Task UpdateSubCategory(int Subid, int Cid, string Sdetails, string Subname, int Gst) { try { SubCategoryModel subcat = _repo.getsubcategorybyid(Subid); subcat.Subid = Subid; subcat.Subname = Subname; subcat.Sdetails = Sdetails; subcat.Gst = Gst; await _repo.updatesubcategory(subcat); SubCategoryModel subcat1 = _repo.getsubcategorybyid(Subid); Assert.AreSame(subcat, subcat1); } catch (Exception ex) { Assert.Fail(ex.InnerException.Message); } }
public async Task <bool> updatesubcategory(SubCategory obj) { try { bool subcat = await _manager.updatesubcategory(obj); if (subcat == true) { return(true); } else { return(false); } } catch (Exception ex) { throw ex; } }