You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should I need to create "ToDataSourceResult" extension method or this will be also come with nuget package of dot net core, In my implementation it is showing some problems related to ToDataSourceResult.
And should I use this with GET method as well, because I am getting all data through the and showing on grid with angular.
The text was updated successfully, but these errors were encountered:
How do I use if I am using generic repository pattern. If my code structure is like this and using GET Methods:
Controller:
[HttpGet]
public async Task GetAllTemplate()
{
List templates = await _emailTemplateService.GetAllTemplate();
return Ok(templates);
}
RepositoryServices for DTO:
public async Task<list> GetAllTemplate()
{
IEnumerable Templates = await _unitWork.TemplateRepositoryUnit.GetAllTemplate();
List TemplateDtos = new List();
foreach (Template Template in templates)
{
templateDtos.Add(new TemplateDto
{
EtId = template.EtId.ToString(),
TemplateName template.EtName,
});
}
return templateDtos;
}
Repository:
public async Task<ienumerable> GetAllTemplate()
{
return await FindByCondition(et => et.EtIsDeleted != true).ToListAsync();
}
Should I need to create "ToDataSourceResult" extension method or this will be also come with nuget package of dot net core, In my implementation it is showing some problems related to ToDataSourceResult.
And should I use this with GET method as well, because I am getting all data through the and showing on grid with angular.
The text was updated successfully, but these errors were encountered: