Skip to content

Commit

Permalink
fix(MySqlDataServiceAsync): AddMultiple<T> now properly inserts item …
Browse files Browse the repository at this point in the history
…to db. fixes #22
  • Loading branch information
russkyc committed May 11, 2023
1 parent 25f60b5 commit ce1c46e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Russkyc.GroomWise/Services/Data/MySqlDataServiceAsync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public async Task<bool> Add<T>(T item)
public async Task<bool> AddMultiple<T>(ICollection<T> items)
where T : class, new()
{
return await _db.Insert(items).ExecuteIdentityAsync() > 0;
return await _db.Insert(items.ToList()).ExecuteIdentityAsync() > 0;
}

public async Task<T> Get<T>(Expression<Func<T, bool>> filter)
Expand Down

0 comments on commit ce1c46e

Please sign in to comment.