{"id":494348,"date":"2026-09-11T09:24:26","date_gmt":"2026-09-11T09:24:26","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=494348"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=494348","title":{"rendered":"\u0427\u0442\u043e \u0441\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 ORM \u0434\u043b\u044f C#: \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 RepoDB \u0438 SqlSugar"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041a\u043e\u0433\u0434\u0430 \u0440\u0435\u0447\u044c \u0437\u0430\u0445\u043e\u0434\u0438\u0442 \u043e\u0431 ORM, \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e C# \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u0440\u0430\u0437\u0443 \u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0442 \u043c\u043e\u0449\u043d\u044b\u0439 Entity Framework Core \u0438\u043b\u0438 \u0436\u0435 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u044b\u0439 Dapper. \u041d\u043e \u0447\u0442\u043e \u043d\u0430\u0441\u0447\u0451\u0442 RepoDB \u0438 SqlSugar? \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043c\u0435\u043d\u044c\u0448\u0443\u044e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u044c, \u044d\u0442\u0438 ORM \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e\u0442 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c\u0441\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0432 \u0438\u0445 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/e60\/a24\/765\/e60a2476558356b68cc98a91d44b03b3.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/e60\/a24\/765\/e60a2476558356b68cc98a91d44b03b3.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/e60\/a24\/765\/e60a2476558356b68cc98a91d44b03b3.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u0442\u0440\u0443\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f ORM. \u0418 \u043d\u0435 \u0441\u043f\u0440\u043e\u0441\u0442\u0430. \u042d\u0442\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442 \u0436\u0438\u0437\u043d\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c: \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0434\u0430 \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 SQL.<\/p>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e ORM \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445: \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c, \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 SQL. \u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u0442\u0430\u043a\u043e\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u043e\u0438\u0442\u044c \u0434\u043e\u0440\u043e\u0433\u043e: \u043e\u0442 \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0434\u043e \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0434\u0430\u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>\u0412 \u043c\u0438\u0440\u0435 .NET \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <a href=\"https:\/\/github.com\/dotnet\/efcore\">Entity Framework Core<\/a> \u0438 <a href=\"https:\/\/github.com\/DapperLib\/Dapper\">Dapper<\/a>. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u0421\u0440\u0435\u0434\u0438 \u0442\u0430\u043a\u0438\u0445 ORM \u2014 <a href=\"https:\/\/github.com\/mikependon\/RepoDB\">RepoDB<\/a> \u0438 <a href=\"https:\/\/github.com\/DotNetNext\/SqlSugar\">SqlSugar<\/a>.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043d\u0438\u0445 \u0433\u043b\u0430\u0437\u0430\u043c\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio. \u0412\u043c\u0435\u0441\u0442\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 API \u0438\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438 \u043f\u043e\u0438\u0449\u0435\u043c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438.<\/p>\n<h3>SqlSugar<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u043e\u0431\u0437\u043e\u0440\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043a\u043e\u0434\u0430 SqlSugar. \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u0438\u0437 \u044d\u0442\u043e\u0433\u043e <a href=\"https:\/\/github.com\/DotNetNext\/SqlSugar\/tree\/d221c7b14ab4bc4c81ce53b6a450c96e70091168\">\u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/a>.<\/p>\n<h4>\u0417\u0430\u0431\u044b\u0442\u044b\u0439 CancellationToken<\/h4>\n<h3>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 1<\/h3>\n<pre><code class=\"cpp\">public Task&lt;int&gt; ExecuteCommandAsync(string sql, object parameters,   CancellationToken cancellationToken) {  this.CancellationToken = CancellationToken;  return ExecuteCommandAsync(sql,parameters);}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3005\/\">V3005<\/a> The \u2018this.CancellationToken\u2019 variable is assigned to itself. <a href=\"https:\/\/github.com\/DotNetNext\/SqlSugar\/blob\/d221c7b14ab4bc4c81ce53b6a450c96e70091168\/Src\/Asp.Net\/SqlSugar\/Abstract\/AdoProvider\/AdoProvider.cs#L1472\">AdoProvider.cs 1472<\/a><\/p>\n<p>\u0412 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>CancellationToken<\/code> \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u044d\u0442\u043e\u043c\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code>cancellationToken<\/code>.<\/p>\n<h4>\u0411\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0440\u043e\u043a\u0438<\/h4>\n<h3>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 2<\/h3>\n<pre><code class=\"cpp\">private static void AppColumns(SqlInfo result,   ISugarQueryable&lt;object&gt; queryable,   string columnName){  var selectPkName = queryable.SqlBuilder.GetTranslationColumnName(columnName);  if (result.IsSelectNav)   {    if (   result.SelectString != null         &amp;&amp; !result.SelectString                  .ToLower()                  .Contains($\" {selectPkName.ToLower()}                              AS {selectPkName.ToLower()}\"))            \/\/ &lt;=    {      result.SelectString = result.SelectString + \",\"         + (selectPkName + \" AS \" + selectPkName);    }  }  ....}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3122\/\">V3122<\/a> Lowercase string is compared with a different mixed case string. <a href=\"https:\/\/github.com\/DotNetNext\/SqlSugar\/blob\/d221c7b14ab4bc4c81ce53b6a450c96e70091168\/Src\/Asp.Net\/SqlSugar\/Abstract\/QueryableProvider\/NavigatManager.cs#L1131\">NavigatManager.cs 1131<\/a><\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f, \u0432 \u0447\u0451\u043c \u0442\u0443\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u0440\u043e\u043a\u0443 <code>result.SelectString<\/code> \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <code>ToLower<\/code>, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u043b\u0438 \u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 <code>$\" {selectPkName.ToLower()} AS {selectPkName.ToLower()}\"<\/code>. \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0438\u0441\u043a\u043e\u043c\u0430\u044f \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u0443\u043a\u0432\u044b \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435 (<code>AS<\/code>). \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u0435\u0442\u043e\u0434 <code>Contains<\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c <code>false<\/code>.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043a \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443:<\/p>\n<pre><code class=\"cpp\">!result.SelectString       .ToLower()       .Contains($\" {selectPkName.ToLower()} as {selectPkName.ToLower()}\"))<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u041f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u044f<\/h4>\n<h3>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 3<\/h3>\n<pre><code class=\"cpp\">public override string ToSqlString(){  ....  if (it.InsertServerTime || it.InsertSql.HasValue())   {    return GetDbColumn(it,null);  }  object value = null;  if (it.Value is DateTime)  {    ....  }  else if (   it.Value is int            || it.Value is long            || it.Value is short                                    \/\/ &lt;=           || it.Value is short                                    \/\/ &lt;=           || it.Value is byte            || it.Value is double)  {    return  it.Value;  }    ....}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3001\/\">V3001<\/a> There are identical sub-expressions \u2018it.Value is short\u2019 to the left and to the right of the \u2018||\u2019 operator. <a href=\"https:\/\/github.com\/DotNetNext\/SqlSugar\/blob\/d221c7b14ab4bc4c81ce53b6a450c96e70091168\/Src\/Asp.Net\/SqlSugar\/Realization\/QuestDB\/SqlBuilder\/QuestDBInsertBuilder.cs#L89\">QuestDBInsertBuilder.cs 89<\/a><\/p>\n<p>\u0414\u0432\u0430\u0436\u0434\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code>it.Value is short<\/code> \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u043c\u0435\u0441\u0442\u043e <code>short<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0442\u043e\u044f\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0438\u043f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>decimal<\/code> \u0438\u043b\u0438 <code>float<\/code>.<\/p>\n<h3>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 4<\/h3>\n<pre><code class=\"cpp\">public static Func&lt;string, object&gt; GetTypeConvert(object value){  if (   value is int       || value is uint       || value is int?       || value is uint?)  {    return x =&gt; Convert.ToInt32(x);  }  else if (   value is short            || value is ushort            || value is short?            || value is ushort?)  {    return x =&gt; Convert.ToInt16(x);  }  else if (   value is long            || value is long?                                       \/\/ &lt;=           || value is ulong?            || value is long?)                                      \/\/ &lt;=  {    return x =&gt; Convert.ToInt64(x);  }  ....}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3001\/\">V3001<\/a> There are identical sub-expressions \u2018value is long?\u2019 to the left and to the right of the \u2018||\u2019 operator. <a href=\"https:\/\/github.com\/DotNetNext\/SqlSugar\/blob\/d221c7b14ab4bc4c81ce53b6a450c96e70091168\/Src\/Asp.Net\/SqlSugar.MySqlConnector\/Tools\/UtilMethods.cs#L288\">UtilMethods.cs 288<\/a><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0434\u0432\u0430\u0436\u0434\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <code>value is long?<\/code>. \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043a\u043e\u0434\u0430 \u0432\u044b\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u0442\u043e\u0440\u043e\u0435 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 <code>value is ulong<\/code>.<\/p>\n<h4>\u041d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<\/h4>\n<h3>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 5<\/h3>\n<pre><code class=\"cpp\">private string GetName(ExpressionParameter parameter,                        MemberExpression expression,                        bool? isLeft,                        bool isSingle){  if (isSingle)  {    return GetSingleName(parameter, expression, IsLeft);  }  else  {    return GetMultipleName(parameter, expression, IsLeft);  }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3196\/\">V3196<\/a> The \u2018isLeft\u2019 parameter is not utilized inside the method body, but an identifier with a similar name is used inside the same method. <a href=\"https:\/\/github.com\/DotNetNext\/SqlSugar\/blob\/d221c7b14ab4bc4c81ce53b6a450c96e70091168\/Src\/Asp.Net\/SqlSugar\/ExpressionsToSql\/ResolveItems\/MemberExpressionResolve.cs#L770\">MemberExpressionResolve.cs 770<\/a><\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>isLeft<\/code> \u043d\u0435 \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d, \u043e\u0434\u043d\u0430\u043a\u043e \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u0438\u043c\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u0439 \u0431\u0443\u043a\u0432\u044b.<\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <code>IsLeft<\/code> \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>isLeft<\/code> \u043c\u0435\u0442\u043e\u0434\u0430 <code>GetName<\/code>.<\/p>\n<h4>\u041f\u043e\u0442\u0435\u0440\u044f\u043d\u043d\u044b\u0439 num<\/h4>\n<h3>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 6<\/h3>\n<pre><code class=\"cpp\">public string GetValue(Expression expression){  var numExp = (expression as MethodCallExpression).Arguments[0];  var num =1;  if (ExpressionTool.GetParameters(numExp).Any())   {     var copyContext = this.Context.GetCopyContextWithMapping();    copyContext.IsSingle = false;    copyContext.Resolve(numExp, ResolveExpressType.WhereMultiple);    copyContext.Result.GetString();                              \/\/ &lt;=  }  else   {    num = ExpressionTool.DynamicInvoke(numExp).ObjToInt();  }  var take = (expression as MethodCallExpression);   if (....)  {    return \"TOP \" + num;  }  else if (this.Context is OracleExpressionContext)  {    return (HasWhere ? \"AND\" : \"WHERE\") + \" ROWNUM&lt;=\" + num;  }  else if (....)  {    return \"limit \" + num;  }  else if (this.Context.GetLimit() != null)  {    if (this?.Context?.Case != null)    {      this.Context.Case.HasWhere = this.HasWhere;      this.Context.Case.Num = num;    }    return this.Context.GetLimit();  }  else  {    return \"limit \" + num;  }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3010\/\">V3010<\/a> The return value of function \u2018GetString\u2019 is required to be utilized.  <a href=\"https:\/\/github.com\/DotNetNext\/SqlSugar\/blob\/d221c7b14ab4bc4c81ce53b6a450c96e70091168\/Src\/Asp.Net\/SqlSugar\/ExpressionsToSql\/Subquery\/Items\/SubTake.cs#L64\">SubTake.cs 64<\/a><\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <code>GetString<\/code> \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <code>GetString<\/code> \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <code>_Result<\/code>. \u041e\u043d \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0438 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0431\u044b \u0434\u0430\u043b\u044c\u0448\u0435 \u0432 \u043a\u043e\u0434\u0435:<\/p>\n<pre><code class=\"cpp\">public string GetString(){  if (_Result == null) return null;  if (IsUpper)    return  _Result.ToString()         .ToUpper()         .Replace(UtilConstants.ReplaceCommaKey,\",\")         .TrimEnd(',');  else    return _Result.ToString()                  .Replace(UtilConstants.ReplaceCommaKey, \",\")                  .TrimEnd(',');}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0437\u043e\u0432\u0430 <code>GetString<\/code> \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043a\u043e\u0434\u0435 \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0437\u0430\u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 <code>num<\/code>.<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430: \u0432\u043e \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430\u0445 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430 \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>num<\/code>. \u0421\u043b\u0435\u0434\u0443\u044f \u044d\u0442\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0435, \u043e\u0431\u0435 \u0432\u0435\u0442\u043a\u0438 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c, \u043f\u043e \u0441\u0443\u0442\u0438, \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>num<\/code>.<\/p>\n<p>\u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cpp\">copyContext.Resolve(numExp, ResolveExpressType.WhereMultiple);num = copyContext.Result.GetString();<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>RepoDB<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u043e\u0431\u0437\u043e\u0440\u0443 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0441\u0442 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 RepoDB. \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0432\u0437\u044f\u0442\u044b \u0438\u0437 \u044d\u0442\u043e\u0433\u043e <a href=\"https:\/\/github.com\/mikependon\/RepoDB\/tree\/58004d4b05a99b0332e8eb3bbe74d366030b8924\">\u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/a>.<\/p>\n<h4>\u0411\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438<\/h4>\n<h3>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 1<\/h3>\n<pre><code class=\"cpp\">public static object GetValue(this ConditionalExpression expression){  var test = expression.Test.GetValue();  var trueValue = expression.IfTrue.GetValue();  if (expression.Test.NodeType == ExpressionType.Equal)  {    return test == trueValue ? trueValue : expression.IfFalse.GetValue();  }  else if (expression.Test.NodeType == ExpressionType.NotEqual)  {    return test != trueValue ? trueValue : expression.IfFalse.GetValue();  }  else if (expression.Test.NodeType &gt; ExpressionType.GreaterThan)  {    ....  }  else if (expression.Test.NodeType &gt; ExpressionType.GreaterThanOrEqual)\/\/ &lt;=  {    ....    }  else if (expression.Test.NodeType &gt; ExpressionType.LessThan)          \/\/ &lt;=  {    ....  }    else if (expression.Test.NodeType &gt; ExpressionType.LessThanOrEqual) \/\/ &lt;=  {    ....  }    throw new NotSupportedException(....);}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f PVS-Studio:<\/p>\n<ul>\n<li>\n<p>V3022 Expression \u2018expression.Test.NodeType &gt; ExpressionType.GreaterThanOrEqual\u2019 is always false. <a href=\"https:\/\/github.com\/mikependon\/RepoDB\/blob\/58004d4b05a99b0332e8eb3bbe74d366030b8924\/RepoDb.Core\/RepoDb\/Extensions\/ExpressionExtension.cs#L456\">ExpressionExtension.cs 456<\/a><\/p>\n<\/li>\n<li>\n<p>V3022 Expression \u2018expression.Test.NodeType &gt; ExpressionType.LessThan\u2019 is always false. <a href=\"https:\/\/github.com\/mikependon\/RepoDB\/blob\/58004d4b05a99b0332e8eb3bbe74d366030b8924\/RepoDb.Core\/RepoDb\/Extensions\/ExpressionExtension.cs#L460\">ExpressionExtension.cs 460<\/a><\/p>\n<\/li>\n<li>\n<p>V3022 Expression \u2018expression.Test.NodeType &gt; ExpressionType.LessThanOrEqual\u2019 is always false. <a href=\"https:\/\/github.com\/mikependon\/RepoDB\/blob\/58004d4b05a99b0332e8eb3bbe74d366030b8924\/RepoDb.Core\/RepoDb\/Extensions\/ExpressionExtension.cs#L464\">ExpressionExtension.cs 464<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u043c\u0435\u0442\u043e\u0434\u0435 <code>GetValue<\/code> \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code>expression.Test.NodeType<\/code> \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f <code>ExpressionType<\/code>. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u0445 \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>&gt;<\/code>.<\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0446\u0435\u043f\u043e\u0447\u043a\u0430 <code>else if<\/code> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432 \u043d\u0438\u0436\u043d\u0438\u0445 \u0431\u043b\u043e\u043a\u0430\u0445 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0432 \u0432\u0435\u0440\u0445\u043d\u0438\u0445.<\/p>\n<pre><code class=\"cpp\">public enum ExpressionType{  ....  GreaterThan = 15,  GreaterThanOrEqual = 16,  ....  LessThan = 20,  LessThanOrEqual = 21,  ....}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 <code>expression.Test.NodeType &gt; ExpressionType.GreaterThan<\/code> \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f.<\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 <code>expression.Test.NodeType &gt; ExpressionType.GreaterThan<\/code> \u0431\u0443\u0434\u0435\u0442 <code>true<\/code>, \u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u044b, \u0430 \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 <code>false<\/code>, \u0442\u043e \u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0431\u0443\u0434\u0443\u0442 <code>false<\/code>.<\/p>\n<h4>\u0421opy-paste \u043e\u0448\u0438\u0431\u043a\u0430<\/h4>\n<h3>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 2<\/h3>\n<pre><code class=\"cpp\">public override int GetHashCode(){  \/\/ Make sure to return if it is already provided  if (this.hashCode != null)  {    return this.hashCode.Value;  }  \/\/ Get first the entity hash code  var hashCode = HashCode.Combine(base.GetHashCode(), Name, \".UpdateAll\");  \/\/ Get the fields  if (Fields != null)  {    foreach (var field in Fields)                           \/\/ &lt;=    {      hashCode = HashCode.Combine(hashCode, field);    }  }  \/\/ Get the qualifier &lt;see cref=\"Field\"\/&gt; objects  if (Fields != null)                                       \/\/ &lt;=  {    foreach (var field in Qualifiers)    {      hashCode = HashCode.Combine(hashCode, field);    }  }  ....}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3127\/\">V3127<\/a> Two similar code fragments were found. Perhaps, this is a typo and \u2018Qualifiers\u2019 variable should be used instead of \u2018Fields\u2019. <a href=\"https:\/\/github.com\/mikependon\/RepoDB\/blob\/58004d4b05a99b0332e8eb3bbe74d366030b8924\/RepoDb.Core\/RepoDb\/Requests\/UpdateAllRequest.cs#L124\">UpdateAllRequest.cs 124<\/a><\/p>\n<p><code>Fields<\/code> \u0434\u0432\u0430\u0436\u0434\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e <code>null<\/code>. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043c\u0435\u0441\u0442\u043e <code>Fields<\/code> \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c <code>Qualifiers<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u0430 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 <code>foreach<\/code>.<\/p>\n<h3>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 3<\/h3>\n<pre><code class=\"cpp\">public static Task&lt;int&gt; UpdateAllAsync&lt;TEntity&gt;(....    Expression&lt;Func&lt;TEntity, object&gt;&gt; qualifiers,    ....,    IEnumerable&lt;Field&gt; fields = null,    ....)    where TEntity : class{  return UpdateAllAsyncInternal&lt;TEntity&gt;(connection: connection,    tableName: tableName,    entities: entities,    qualifiers: fields,                                      \/\/ &lt;=    batchSize: batchSize,    fields: fields,                                          \/\/ &lt;=    hints: hints,    commandTimeout: commandTimeout,    traceKey: traceKey,    transaction: transaction,    trace: trace,    statementBuilder: statementBuilder,    cancellationToken: cancellationToken);}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3038\/\">V3038<\/a> The argument was passed to method several times. It is possible that other argument should be passed instead. <a href=\"https:\/\/github.com\/mikependon\/RepoDB\/blob\/58004d4b05a99b0332e8eb3bbe74d366030b8924\/RepoDb.Core\/RepoDb\/Operations\/DbConnection\/UpdateAll.cs#L619\">UpdateAll.cs 619<\/a><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432 \u043c\u0435\u0442\u043e\u0434 <code>UpdateAllAsyncInternal<\/code> \u0434\u0432\u0430\u0436\u0434\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>fields<\/code>, \u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>qualifiers<\/code>, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c <code>qualifiers<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">qualifiers: Field.Parse&lt;TEntity&gt;(qualifiers)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u041f\u0443\u0441\u0442\u0430\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f<\/h4>\n<h3>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 4<\/h3>\n<pre><code class=\"cpp\">public override string CreateBatchQuery(string tableName,  IEnumerable&lt;Field&gt; fields,  int page,  int rowsPerBatch,  IEnumerable&lt;OrderField&gt; orderBy = null,  QueryGroup where = null,  string hints = null){  \/\/ Ensure with guards  GuardTableName(tableName);  \/\/ Validate the hints  GuardHints(hints);  \/\/ There should be fields  if (fields?.Any() != true)  {    throw new MissingFieldsException(fields?.Select(f =&gt; f.Name));  }  ....}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3191\/\">V3191<\/a> Iteration through the \u2018fields\u2019 collection makes no sense because it is always empty. <a href=\"https:\/\/github.com\/mikependon\/RepoDB\/blob\/58004d4b05a99b0332e8eb3bbe74d366030b8924\/RepoDb.SqlServer\/RepoDb.SqlServer\/StatementBuilders\/SqlServerStatementBuilder.cs#L70\">SqlServerStatementBuilder.cs 70<\/a><\/p>\n<p>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 <code>fields?.Any() != true<\/code> \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u043c \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f <code>fields<\/code> \u043f\u0443\u0441\u0442\u0430\u044f \u0438\u043b\u0438 <code>null<\/code>. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, <code>fields?.Select(f =&gt; f.Name)<\/code> \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u0443\u044e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0438\u043b\u0438 <code>null<\/code>.<\/p>\n<h4>\u041a\u043e\u0432\u0430\u0440\u043d\u044b\u0439 null<\/h4>\n<h3>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 5<\/h3>\n<pre><code class=\"cpp\">public override Guid GetGuid(int i){  ThrowExceptionIfNotAvailable();  return Guid.Parse(GetValue(i)?.ToString());}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3105\/\">V3105<\/a> The result of null-conditional operator is passed as the first argument to the \u2018Parse\u2019 method and is not expected to be null. <a href=\"https:\/\/github.com\/mikependon\/RepoDB\/blob\/58004d4b05a99b0332e8eb3bbe74d366030b8924\/RepoDb.Core\/RepoDb\/DataEntityDataReader.cs#L405\">DataEntityDataReader.cs 405<\/a><\/p>\n<p>\u0422\u0443\u0442 <code>GetValue(i)<\/code> \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c <code>null<\/code>, \u0438 \u0438\u0437-\u0437\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code>?<\/code> \u044d\u0442\u043e\u0442 <code>null<\/code> \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0432 \u043c\u0435\u0442\u043e\u0434 <code>Guid.Parse<\/code>. \u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043c\u0435\u0442\u043e\u0434 <code>Guid.Parse<\/code> \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 <code>null<\/code> \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <code>ArgumentNullException<\/code>.<\/p>\n<h3>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 6<\/h3>\n<pre><code class=\"cpp\">public static void AssertMembersEquality(  object obj,   IDictionary&lt;string, object&gt; dictionary){  ....  var value1 = property.GetValue(obj);  var value2 = dictionary[property.Name];  if (value1 is byte[] b1 &amp;&amp; value2 is byte[] b2)  {    ....  else  {    var propertyType = property.PropertyType.GetUnderlyingType();    if (propertyType == typeof(TimeSpan) &amp;&amp; value2 is DateTime dateTime)    {      value2 = dateTime.TimeOfDay;    }    else if (propertyType == typeof(string) &amp;&amp; value2 is DateTime)    {      value1 = DateTime.Parse(value1?.ToString());                \/\/ &lt;=    }  ....}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3105\/\">V3105<\/a> The result of null-conditional operator is passed as the first argument to the \u2018Parse\u2019 method and is not expected to be null. <a href=\"https:\/\/github.com\/mikependon\/RepoDB\/blob\/58004d4b05a99b0332e8eb3bbe74d366030b8924\/RepoDb.SqLite\/RepoDb.SqLite.IntegrationTests\/Helper.cs#L157\">Helper.cs 157<\/a><\/p>\n<p>\u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u0435\u0441\u043b\u0438 <code>value1<\/code> \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f <code>null<\/code>, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0448\u0435\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <code>ArgumentNullException<\/code>.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0432\u043d\u0443\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043c \u043a\u043e\u0434\u0430 \u0438 \u0431\u043e\u0433\u0430\u0442\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u0432 \u0445\u043e\u0434\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0441\u0442. \u042d\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u0431\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435.<\/p>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442. \u0414\u0430\u0436\u0435 \u0432 \u0437\u0440\u0435\u043b\u044b\u0445 \u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f copy-paste \u043e\u0448\u0438\u0431\u043a\u0438, \u0437\u0430\u0431\u044b\u0442\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u043d\u0435\u0434\u043e\u0447\u0451\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0418\u043c\u0435\u043d\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c: \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u0430\u043a\u0438\u0435 \u043c\u0435\u0441\u0442\u0430 \u0435\u0449\u0451 \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043e\u043d\u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u044f\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio, \u0442\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043c\u043e\u0436\u043d\u043e \u043f\u043e <a href=\"https:\/\/pvs-studio.ru\/ru\/pvs-studio\/try-free\/?utm_source=website&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=1411\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<p>\u0411\u0435\u0440\u0435\u0433\u0438\u0442\u0435 \u0441\u0435\u0431\u044f \u0438 \u0441\u0432\u043e\u0439 \u043a\u043e\u0434!<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Georgii Tormozov. <a href=\"https:\/\/pvs-studio.com\/en\/blog\/posts\/csharp\/1411\/\">What popular ORMs for C# hide: Let\u2019s check RepoDB and SqlSugar<\/a>.<\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1081204\/\">https:\/\/habr.com\/ru\/articles\/1081204\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u043e\u0433\u0434\u0430 \u0440\u0435\u0447\u044c \u0437\u0430\u0445\u043e\u0434\u0438\u0442 \u043e\u0431 ORM, \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e C# \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u0440\u0430\u0437\u0443 \u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0442 \u043c\u043e\u0449\u043d\u044b\u0439 Entity Framework Core \u0438\u043b\u0438 \u0436\u0435 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u044b\u0439 Dapper. \u041d\u043e \u0447\u0442\u043e \u043d\u0430\u0441\u0447\u0451\u0442 RepoDB \u0438 SqlSugar? \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043c\u0435\u043d\u044c\u0448\u0443\u044e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u044c, \u044d\u0442\u0438 ORM \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e\u0442 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c\u0441\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0432 \u0438\u0445 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430.\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u0421\u0435\u0439\u0447\u0430\u0441 \u0442\u0440\u0443\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f ORM. \u0418 \u043d\u0435 \u0441\u043f\u0440\u043e\u0441\u0442\u0430. \u042d\u0442\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442 \u0436\u0438\u0437\u043d\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c: \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0434\u0430 \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 SQL.\u0418\u043c\u0435\u043d\u043d\u043e ORM \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445: \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c, \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 SQL. \u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u0442\u0430\u043a\u043e\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u043e\u0438\u0442\u044c \u0434\u043e\u0440\u043e\u0433\u043e: \u043e\u0442 \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0434\u043e \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0434\u0430\u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e.\u0412 \u043c\u0438\u0440\u0435 .NET \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f Entity Framework Core \u0438 Dapper. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u0421\u0440\u0435\u0434\u0438 \u0442\u0430\u043a\u0438\u0445 ORM \u2014 RepoDB \u0438 SqlSugar.\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043d\u0438\u0445 \u0433\u043b\u0430\u0437\u0430\u043c\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio. \u0412\u043c\u0435\u0441\u0442\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 API \u0438\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438 \u043f\u043e\u0438\u0449\u0435\u043c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438.SqlSugar\u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u043e\u0431\u0437\u043e\u0440\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043a\u043e\u0434\u0430 SqlSugar. \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430.\u0417\u0430\u0431\u044b\u0442\u044b\u0439 CancellationToken\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 1public Task&lt;int&gt; ExecuteCommandAsync(string sql, object parameters,   CancellationToken cancellationToken) {  this.CancellationToken = CancellationToken;  return ExecuteCommandAsync(sql,parameters);}\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V3005 The \u2018this.CancellationToken\u2019 variable is assigned to itself. AdoProvider.cs 1472\u0412 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e CancellationToken \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u044d\u0442\u043e\u043c\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 cancellationToken.\u0411\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0440\u043e\u043a\u0438\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 2private static void AppColumns(SqlInfo result,   ISugarQueryable&lt;object&gt; queryable,   string columnName){  var selectPkName = queryable.SqlBuilder.GetTranslationColumnName(columnName);  if (result.IsSelectNav)   {    if (   result.SelectString != null         &amp;&amp; !result.SelectString                  .ToLower()                  .Contains($&#187; {selectPkName.ToLower()}                              AS {selectPkName.ToLower()}&#187;))            \/\/ &lt;=    {      result.SelectString = result.SelectString + &#171;,&#187;         + (selectPkName + &#187; AS &#187; + selectPkName);    }  }  &#8230;.}\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V3122 Lowercase string is compared with a different mixed case string. NavigatManager.cs 1131\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f, \u0432 \u0447\u0451\u043c \u0442\u0443\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u0440\u043e\u043a\u0443 result.SelectString \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 ToLower, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u043b\u0438 \u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 $&#187; {selectPkName.ToLower()} AS {selectPkName.ToLower()}&#187;. \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0438\u0441\u043a\u043e\u043c\u0430\u044f \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u0443\u043a\u0432\u044b \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435 (AS). \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u0435\u0442\u043e\u0434 Contains \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c false.\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043a \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443:!result.SelectString       .ToLower()       .Contains($&#187; {selectPkName.ToLower()} as {selectPkName.ToLower()}&#187;))\u041f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 3public override string ToSqlString(){  &#8230;.  if (it.InsertServerTime || it.InsertSql.HasValue())   {    return GetDbColumn(it,null);  }  object value = null;  if (it.Value is DateTime)  {    &#8230;.  }  else if (   it.Value is int            || it.Value is long            || it.Value is short                                    \/\/ &lt;=           || it.Value is short                                    \/\/ &lt;=           || it.Value is byte            || it.Value is double)  {    return  it.Value;  }    &#8230;.}\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V3001 There are identical sub-expressions \u2018it.Value is short\u2019 to the left and to the right of the \u2018||\u2019 operator. QuestDBInsertBuilder.cs 89\u0414\u0432\u0430\u0436\u0434\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 it.Value is short \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u043c\u0435\u0441\u0442\u043e short \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0442\u043e\u044f\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0438\u043f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 decimal \u0438\u043b\u0438 float.\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 4public static Func&lt;string, object&gt; GetTypeConvert(object value){  if (   value is int       || value is uint       || value is int?       || value is uint?)  {    return x =&gt; Convert.ToInt32(x);  }  else if (   value is short            || value is ushort            || value is short?            || value is ushort?)  {    return x =&gt; Convert.ToInt16(x);  }  else if (   value is long            || value is long?                                       \/\/ &lt;=           || value is ulong?            || value is long?)                                      \/\/ &lt;=  {    return x =&gt; Convert.ToInt64(x);  }  &#8230;.}\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V3001 There are identical sub-expressions \u2018value is long?\u2019 to the left and to the right of the \u2018||\u2019 operator. UtilMethods.cs 288\u0417\u0434\u0435\u0441\u044c \u0434\u0432\u0430\u0436\u0434\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 value is long?. \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043a\u043e\u0434\u0430 \u0432\u044b\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u0442\u043e\u0440\u043e\u0435 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 value is ulong.\u041d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 5private string GetName(ExpressionParameter parameter,                        MemberExpression expression,                        bool? isLeft,                        bool isSingle){  if (isSingle)  {    return GetSingleName(parameter, expression, IsLeft);  }  else  {    return GetMultipleName(parameter, expression, IsLeft);  }}\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V3196 The \u2018isLeft\u2019 parameter is not utilized inside the method body, but an identifier with a similar name is used inside the same method. MemberExpressionResolve.cs 770\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 isLeft \u043d\u0435 \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d, \u043e\u0434\u043d\u0430\u043a\u043e \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u0438\u043c\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u0439 \u0431\u0443\u043a\u0432\u044b.\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 IsLeft \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 isLeft \u043c\u0435\u0442\u043e\u0434\u0430 GetName.\u041f\u043e\u0442\u0435\u0440\u044f\u043d\u043d\u044b\u0439 num\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 6public string GetValue(Expression expression){  var numExp = (expression as MethodCallExpression).Arguments[0];  var num =1;  if (ExpressionTool.GetParameters(numExp).Any())   {     var copyContext = this.Context.GetCopyContextWithMapping();    copyContext.IsSingle = false;    copyContext.Resolve(numExp, ResolveExpressType.WhereMultiple);    copyContext.Result.GetString();                              \/\/ &lt;=  }  else   {    num = ExpressionTool.DynamicInvoke(numExp).ObjToInt();  }  var take = (expression as MethodCallExpression);   if (&#8230;.)  {    return &#171;TOP &#187; + num;  }  else if (this.Context is OracleExpressionContext)  {    return (HasWhere ? &#171;AND&#187; : &#171;WHERE&#187;) + &#187; ROWNUM&lt;=&#187; + num;  }  else if (&#8230;.)  {    return &#171;limit &#187; + num;  }  else if (this.Context.GetLimit() != null)  {    if (this?.Context?.Case != null)    {      this.Context.Case.HasWhere = this.HasWhere;      this.Context.Case.Num = num;    }    return this.Context.GetLimit();  }  else  {    return &#171;limit &#187; + num;  }}\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V3010 The return value of function \u2018GetString\u2019 is required to be utilized.  SubTake.cs 64\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 GetString \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 GetString \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 _Result. \u041e\u043d \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0438 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0431\u044b \u0434\u0430\u043b\u044c\u0448\u0435 \u0432 \u043a\u043e\u0434\u0435:public string GetString(){  if (_Result == null) return null;  if (IsUpper)    return  _Result.ToString()         .ToUpper()         .Replace(UtilConstants.ReplaceCommaKey,&#187;,&#187;)         .TrimEnd(&#8216;,&#8217;);  else    return _Result.ToString()                  .Replace(UtilConstants.ReplaceCommaKey, &#171;,&#187;)                  .TrimEnd(&#8216;,&#8217;);}\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0437\u043e\u0432\u0430 GetString \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043a\u043e\u0434\u0435 \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0437\u0430\u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 num.\u041d\u0430 \u044d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430: \u0432\u043e \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430\u0445 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430 \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f num. \u0421\u043b\u0435\u0434\u0443\u044f \u044d\u0442\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0435, \u043e\u0431\u0435 \u0432\u0435\u0442\u043a\u0438 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c, \u043f\u043e \u0441\u0443\u0442\u0438, \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e num.\u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:copyContext.Resolve(numExp, ResolveExpressType.WhereMultiple);num = copyContext.Result.GetString();RepoDB\u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u043e\u0431\u0437\u043e\u0440\u0443 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0441\u0442 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 RepoDB. \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0432\u0437\u044f\u0442\u044b \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430.\u0411\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 1public static object GetValue(this ConditionalExpression expression){  var test = expression.Test.GetValue();  var trueValue = expression.IfTrue.GetValue();  if (expression.Test.NodeType == ExpressionType.Equal)  {    return test == trueValue ? trueValue : expression.IfFalse.GetValue();  }  else if (expression.Test.NodeType == ExpressionType.NotEqual)  {    return test != trueValue ? trueValue : expression.IfFalse.GetValue();  }  else if (expression.Test.NodeType &gt; ExpressionType.GreaterThan)  {    &#8230;.  }  else if (expression.Test.NodeType &gt; ExpressionType.GreaterThanOrEqual)\/\/ &lt;=  {    &#8230;.    }  else if (expression.Test.NodeType &gt; ExpressionType.LessThan)          \/\/ &lt;=  {    &#8230;.  }    else if (expression.Test.NodeType &gt; ExpressionType.LessThanOrEqual) \/\/ &lt;=  {    &#8230;.  }    throw new NotSupportedException(&#8230;.);}\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f PVS-Studio:V3022 Expression \u2018expression.Test.NodeType &gt; ExpressionType.GreaterThanOrEqual\u2019 is always false. ExpressionExtension.cs 456V3022 Expression \u2018expression.Test.NodeType &gt; ExpressionType.LessThan\u2019 is always false. ExpressionExtension.cs 460V3022 Expression \u2018expression.Test.NodeType &gt; ExpressionType.LessThanOrEqual\u2019 is always false. ExpressionExtension.cs 464\u0412 \u043c\u0435\u0442\u043e\u0434\u0435 GetValue \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 expression.Test.NodeType \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f ExpressionType. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u0445 \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 &gt;.\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0446\u0435\u043f\u043e\u0447\u043a\u0430 else if \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432 \u043d\u0438\u0436\u043d\u0438\u0445 \u0431\u043b\u043e\u043a\u0430\u0445 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0432 \u0432\u0435\u0440\u0445\u043d\u0438\u0445.public enum ExpressionType{  &#8230;&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-494348","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/494348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=494348"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/494348\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=494348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=494348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=494348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}