< Summary

Class:WinSolutions.Sveta.Server.Services.Implements.SmsHistoryService
Assembly:WinSolutions.Sveta.Server
File(s):/opt/dev/sveta_api_build/WinSolutions.Sveta.Server/Services/Implements/SmsHistoryService.cs
Covered lines:5
Uncovered lines:4
Coverable lines:9
Total lines:41
Line coverage:55.5% (5 of 9)
Covered branches:0
Total branches:4
Branch coverage:0% (0 of 4)

Metrics

MethodLine coverage Branch coverage
.ctor(...)100%100%
Create()0%0%

File(s)

/opt/dev/sveta_api_build/WinSolutions.Sveta.Server/Services/Implements/SmsHistoryService.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore;
 2using Microsoft.Extensions.Logging;
 3using System;
 4using System.Collections.Generic;
 5using System.Linq;
 6using System.Text.Json;
 7using System.Threading.Tasks;
 8using WinSolutions.Sveta.Server.Domain;
 9using WinSolutions.Sveta.Server.Data.DataModel.Contexts;
 10using WinSolutions.Sveta.Server.Data.DataModel.Entities;
 11using WinSolutions.Sveta.Server.Data.DataModel.Kinds;
 12using WinSolutions.Sveta.Server.Services.Interfaces;
 13using WinSolutions.Sveta.Common;
 14using SVETA.Api.Helpers;
 15
 16
 17namespace WinSolutions.Sveta.Server.Services.Implements
 18{
 19    public class SmsHistoryService : SvetaServiceBase, ISmsHistoryService
 20    {
 21        private readonly SvetaDbContext _db;
 22        private readonly ILogger<SmsHistoryService> _logger;
 23        public SmsHistoryService(SvetaDbContext db, ILogger<SmsHistoryService> logger, IAuthenticationService authentica
 8324            : base(authenticationService)
 8325        {
 8326            _db = db;
 8327            _logger = logger;
 8328        }
 29
 30        /// <summary>
 31        ///создает запись
 32        /// </summary>
 33        /// <param name="data">объект SmsHistory</param>
 34        /// <returns></returns>
 35        public async Task Create(SmsHistory data)
 036        {
 037            await _db.SmsHistory.AddAsync(data);
 038            await _db.SaveChangesAsync(CurrentUserId);
 039        }
 40    }
 41}

Methods/Properties

.ctor(...)
Create()