﻿using System;
using FitnessTracker.Data.Contracts;
using System.Threading.Tasks;

namespace FitnessTracker.Data
{
    public class UnitOfWork : IUnitOfWork
    {
        private readonly IFitnessTrackerDbContext context;

        public UnitOfWork(IFitnessTrackerDbContext context)
        {
            this.context = context;
        }

        public void Dispose()
        {
            //this.context.Dispose();
        }

        public async Task<int> SaveChangesAsync()
        {
            return await this.context.SaveChangesAsync();
        }
    }
}
