public CcGetSubscriptionResponse GetSubscription(CcGetSubscriptionRequest request) { var connection = new SqliteConnection(Settings.SQLiteConnectionString); PersistenceStorage.PersistentDataContext context = new PersistenceStorage.PersistentDataContext(connection); CcGetSubscriptionResponse response = new CcGetSubscriptionResponse(); PersistenceStorage.Subscription subscription = context.Subscription.Where(x => x.ID == request.SubscriptionId).FirstOrDefault(); if (subscription != null) { Subscription subscription_ = TransformSubscription(subscription); response.Subscription = subscription_; } return response; }
public ActionResult Subscription(int subscriptionId) { try { CcGetSubscriptionRequest request = new CcGetSubscriptionRequest(Settings.Credentials); request.SubscriptionId = subscriptionId; CcGetSubscriptionResponse response = EndPoints.CcDashboardService.GetSubscription(request); UpdateApplications(response.Subscription); return View(response.Subscription); } catch (Exception e) { return ShowError(e); } }