using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Threading.Tasks;
using MegaRobo.DataAccess;
using System.Linq;
using MegaRobo.Entities.ViewTT;
using MegaRobo.C00225155.Entities.Entity_DB;
using static System.Runtime.InteropServices.JavaScript.JSType;
using System.Collections;
using System.DirectoryServices.Protocols;

namespace MegaRobo.C00225155.DataAccess;

public class DataAccessService : DataAccessBase, IDataAccessService
{
  
    #region Labx
   
    #endregion

    public async Task<(bool, string)> CreateLiquid1mlPipetteProductModel(Liquid_lml_Dose liquidmodel)
    {
        (bool isOk, string msg) = (false, "");
        try
        {
            using var ctx = this.GetEntities();
            var modelId = await ctx.Insertable(liquidmodel).ExecuteReturnEntityAsync();
            isOk = true;
        }
        catch (Exception ex)
        {
            this.OnException(ex);
            msg = ex.Message;
        }
        return (isOk, msg);
    }

    public async Task<(bool, string)> CreateLiquid1mlPipetteProductModel_React(Liquid_lml_React liquidmodel)
    {
        (bool isOk, string msg) = (false, "");
        try
        {
            using var ctx = this.GetEntities();
            var modelId = await ctx.Insertable(liquidmodel).ExecuteReturnEntityAsync();
            isOk = true;
        }
        catch (Exception ex)
        {
            this.OnException(ex);
            msg = ex.Message;
        }
        return (isOk, msg);
    }

    #region 从数据库查询结果数据
   
    
    #endregion
}