dapper-repositories
dapper-repositories copied to clipboard
CRUD for Dapper
This is the code I used in my project after transformation,Because I need multi-table related query. ``` public Task CountAsync(string customSql, object parameters = null) { string pagedListSql = @$"select...
Originally posted by @apchenjun on February 8, 2022 The CreateTime and UpdateTime fields are often used in the project, and the Version field is concurrently modified by the user. 
Suppose I have an Entity `Student` ```C# public class Student{ // properties } ``` And I make a repository call to return all Students with Pagination (Limit, Offset) ```C# await...
Eg: var options = new[] {"opt1","opt2"}; //List/array strings var results = _repository.FindAll( x=> x.property1.Equals(val1) && options.Any( sVals => x.property2.StartsWith(sVals)); I know that "==" is the same as .Equals () and...
With the repositories we have to pass the entire object to update it, it would be good if we could through a lamda expression indicate the fields that we want...
Ability to map entity and property attribute of POCO class attributes as EF fluent Api
var sqlQuery = userSqlGenerator.GetSelectFirst(p=>true, null);
good day everyone i found such code ``` var propertyInfos = objectType.GetProperties() .OrderBy(p => p.GetCustomAttributes() .Select(a => a.Order) .DefaultIfEmpty(int.MaxValue) .FirstOrDefault()).ToArray(); ``` and as i understand that is the reason why...