ose-net / yesql.net

YeSQL.NET is a class library for loading SQL statements from .sql files instead of writing SQL code in your C# source files

Home Page:https://ose-net.github.io/yesql.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check if the length of params list is zero

MrDave1999 opened this issue · comments

LoadFromDirectories and LoadFromFiles methods do not check if the length of params list is zero:

var data = new YeSqlLoader().LoadFromDirectories();

Expected behavior

It should generate the following error:

Unhandled exception. System.ArgumentException: The length of the params list is zero.

Current behavior

SELECT* FROM [user];
SELECT* FROM [role];
Unhandled exception. YeSql.Net.TagNotFoundException: The given tag 'GetProducts' was not present in the collection.
   at YeSql.Net.YeSqlDictionary.get_Item(String tagName) in C:\Users\syslan\Documents\Visual Studio 2022\yesql.net\src\Collections\YeSqlDictionary.cs:line 27
   at Program.<Main>$(String[] args) in C:\Users\syslan\Documents\Visual Studio 2022\yesql.net\samples\LoaderSample\Program.cs:line 9