| | | 1 | | using System.Threading.Tasks; |
| | | 2 | | using Microsoft.Extensions.Logging; |
| | | 3 | | using WinSolutions.Sveta.Common; |
| | | 4 | | using WinSolutions.Sveta.Server.Data.DataModel.Contexts; |
| | | 5 | | using WinSolutions.Sveta.Server.Data.DataModel.Entities; |
| | | 6 | | using WinSolutions.Sveta.Server.Services.Interfaces; |
| | | 7 | | |
| | | 8 | | namespace WinSolutions.Sveta.Server.Services.Implements |
| | | 9 | | { |
| | | 10 | | public class JobService: SvetaServiceBase, IJobService |
| | | 11 | | { |
| | | 12 | | private readonly ILogger<JobService> _logger; |
| | | 13 | | private readonly SvetaDbContext _db; |
| | | 14 | | |
| | 0 | 15 | | public JobService(SvetaDbContext db, ILogger<JobService> logger, IAuthenticationService authenticationService): |
| | 0 | 16 | | { |
| | 0 | 17 | | _db = db; |
| | 0 | 18 | | _logger = logger; |
| | 0 | 19 | | } |
| | | 20 | | |
| | | 21 | | public async Task Create(JobLogger jobLogger) |
| | 0 | 22 | | { |
| | 0 | 23 | | await _db.JobLoggers.AddAsync(jobLogger); |
| | 0 | 24 | | await _db.SaveChangesAsync(CurrentUserId); |
| | 0 | 25 | | } |
| | | 26 | | } |
| | | 27 | | } |