using Microsoft.Extensions.Logging;
using SlnMesnac.Model.domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SlnMesnac.Repository.service.Impl
{
    public class LogoFormulaImpl : ILogoFormulaService
    {
        private readonly ILogger<LogoFormula> _logger;

        private readonly Repository<LogoFormula> _rep;

        public LogoFormulaImpl(ILogger<LogoFormula> logger, Repository<LogoFormula> rep)
        {
            _logger = logger;
            _rep = rep;
        }

        public async Task<List<LogoFormula>> GetListAsync()
        {
            List<LogoFormula> list = null;
            list = await _rep.GetListAsync();
            return list;
        }

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="record"></param>
        /// <returns></returns>
        public async Task<bool> UpdateAsync(LogoFormula record)
        {
            bool result = await _rep.UpdateAsync(record);
            return result;
        }

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="record"></param>
        /// <returns></returns>
        public async Task<bool> DeleteAsync(LogoFormula record)
        {
            bool result = await _rep.DeleteAsync(record);
            return result;
        }

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="record"></param>
        /// <returns></returns>
        public async Task<bool> InsertAsync(LogoFormula record)
        {
            bool result = await _rep.InsertAsync(record);
            return result;
        }

    }
}
