public async Task <IActionResult> PutSubscriptions(int id, ExpenseService.DataAccess.Model.Subscriptions Subscriptions)
        {
            if (id != Subscriptions.Id)
            {
                return(BadRequest());
            }

            var newSubscriptions = Mapper.MapSub(Subscriptions);

            _repo.Changed(newSubscriptions);

            try
            {
                await _repo.SaveAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!(await SubscriptionsExists(id)))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
 public static Core.Model.CoreSubscriptions MapSub(Model.Subscriptions subscriptions)
 {
     return(new Core.Model.CoreSubscriptions
     {
         Id = subscriptions.Id,
         SubscriptionDate = subscriptions.SubscriptionDate,
         SubscriptionDueDate = subscriptions.SubscriptionDueDate,
         Company = subscriptions.Company,
         Notification = subscriptions.Notification,
         SubscriptionMonthCost = subscriptions.SubscriptionMonthCost,
         SubscriptionName = subscriptions.SubscriptionName,
         UserId = subscriptions.UserId
                  //User = MapUsers(subscriptions.User)
     });
 }