Closed agrinei closed 2 years ago
Interesting. I don't know that we support Char as a property type. But if that's the case, the fix should be easy.
I should have time to work on it today.
That's awesome! :D
I think I found all the places where the change needs to be made. Running the tests now.
Ok, it will be part of the 4.2 release.
Ok, I think I've chased down all of the possible Char scenarios.
@agrinei feel free to reach out if you think I've missing anything.
Ugh, forgot ToCharSet
. Adding #475 to the list.
v4.2 ha been published. https://github.com/TortugaResearch/Tortuga.Chain/releases/tag/v4.2.0
Everything working great. Thanks! Is there a way to support this project?
Honestly, the best way to support a project like this is to help with feature design and testing.
Progress requires motivation. And motivation comes from working with people who are using the library to solve their problems.
For example, four of the last seven features arose from this bug fix and things that naturally followed from it.
That's great. I'm using the project for a long time and I see it as very mature and consistent. Anyway, if I find some room for improvement I'll be happy to share. Thank you again.
You're welcome.
Microsoft SQL Server 2019 Tortuga.Chain.SqlServer.MDS 4.1.0 (just released)
We have an AppUsers table which has a Gender column - char(1) not nullable. When trying to map the Gender column to the CLR char datatype we get the exception above.
Sample:
create table AppUsers ( Id int not null, [Name] nvarchar(100) not null, Gender char(1) not null )
public class AppUser { public int Id { get; set; } public string Name { get; set; } public char Gender { get; set; } }
Sql("select Name, Gender from AppUsers where Id = @id", new { id = 1 }).ToObjectOrNull().Execute();