using BS.Shared.Core; using BS.Shared.DataContracts; using BS.Shared.Exceptions; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BS.Shared.Extensions { public static class ApiResponseExtension { public static T GetResponseData(this ApiResponse data) { if (!data.Success) { throw new BeWoInvalidOperationException(AppError.ApiResponseFailed); } return data.Data; } } }