/// <summary> /// TODO: /// </summary> /// <param name="id"></param> /// <returns></returns> public async Task <bool> SaveRetailer(RetailerModel model) { var entity = model?.MapTo <Retailer>(); if (model.Id < 1) { await _retailerRepository.Insert(entity); } else { await _retailerRepository.Update(entity); } return(true); }