Skip to content

Commit

Permalink
Add xml summaries.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytro-khmara committed Aug 1, 2022
1 parent 9386b4b commit 8665edb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/StrEnum.Dapper/StrEnumDapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ namespace StrEnum.Dapper
{
public static class StrEnumDapper
{
/// <summary>
/// Allows Dapper to handle string enums. Make sure that all of the assemblies that contain string enums have been loaded before calling this method.
/// </summary>
public static void UseStringEnums()
{
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
Expand Down
4 changes: 4 additions & 0 deletions src/StrEnum.Dapper/StrEnumTypeHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

namespace StrEnum.Dapper
{
/// <summary>
/// Provides the way for Dapper to convert string enum members' values from and to strings
/// </summary>
/// <typeparam name="TEnum"></typeparam>
public class StrEnumTypeHandler<TEnum>: SqlMapper.TypeHandler<TEnum> where TEnum : StringEnum<TEnum>, new()
{
public override void SetValue(IDbDataParameter parameter, TEnum value)
Expand Down

0 comments on commit 8665edb

Please sign in to comment.