NlData初学者开发篇(ORM)

一, 简介:NlData是一个个人开发的ORM,为了学习而学习,是基于表达式实现的一个ORM

二,先简单介绍使用,如下,配置是统一接口

 NlClient client = new NlClient(new NlConfig()
 {
    DbType = DbTypeEnum.MySql,
    ConnectionString = configStr,
    IsAutoCloseConnection = true,
    Events = new Events
    {
       OnLogExecuting = (sql, p) =>
       {
         Console.WriteLine(sql);
         Console.WriteLine(string.Join(",", p?.Select(it => it.ParameterName + ":" + it.Value)));
       }
    }
 });

你可能感兴趣的:(NlData初学者开发篇(ORM))