review and refactor some names ...
This commit is contained in:
@@ -31,21 +31,21 @@ namespace xTagService.Interfaces
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
XTagDto ToXTagDto(XTag model);
|
||||
XTagDto ToDto(XTag model);
|
||||
|
||||
/// <summary>
|
||||
/// Converts a List of Entitiies to List of Dto's ...
|
||||
/// </summary>
|
||||
/// <param name="models"></param>
|
||||
/// <returns></returns>
|
||||
IEnumerable<XTagDto> ToXTagDtoList(IEnumerable<XTag> models);
|
||||
IEnumerable<XTagDto> ToDtoList(IEnumerable<XTag> models);
|
||||
|
||||
/// <summary>
|
||||
/// Converts Query Result of Entities to Dto ...
|
||||
/// </summary>
|
||||
/// <param name="queryResult"></param>
|
||||
/// <returns></returns>
|
||||
XQueryResult<XTagDto> ToXTagDtoQueryResult(XQueryResult<XTag> queryResult);
|
||||
XQueryResult<XTagDto> ToDtoQueryResult(XQueryResult<XTag> queryResult);
|
||||
#endregion
|
||||
|
||||
//
|
||||
|
||||
+14
-14
@@ -52,7 +52,7 @@ namespace xTagService.Providers
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public XTagDto ToXTagDto(XTag model)
|
||||
public XTagDto ToDto(XTag model)
|
||||
{
|
||||
return model.ToDto();
|
||||
}
|
||||
@@ -62,7 +62,7 @@ namespace xTagService.Providers
|
||||
/// </summary>
|
||||
/// <param name="models"></param>
|
||||
/// <returns></returns>
|
||||
public IEnumerable<XTagDto> ToXTagDtoList(IEnumerable<XTag> models)
|
||||
public IEnumerable<XTagDto> ToDtoList(IEnumerable<XTag> models)
|
||||
{
|
||||
//
|
||||
var result = new List<XTagDto>();
|
||||
@@ -74,7 +74,7 @@ namespace xTagService.Providers
|
||||
foreach (var model in models)
|
||||
{
|
||||
//
|
||||
var dto = ToXTagDto(model);
|
||||
var dto = ToDto(model);
|
||||
if (!dto.IsNullOrDefault())
|
||||
{
|
||||
result.Add(dto);
|
||||
@@ -91,7 +91,7 @@ namespace xTagService.Providers
|
||||
/// </summary>
|
||||
/// <param name="queryResult"></param>
|
||||
/// <returns></returns>
|
||||
public XQueryResult<XTagDto> ToXTagDtoQueryResult(XQueryResult<XTag> queryResult)
|
||||
public XQueryResult<XTagDto> ToDtoQueryResult(XQueryResult<XTag> queryResult)
|
||||
{
|
||||
//
|
||||
var result = new XQueryResult<XTagDto>();
|
||||
@@ -110,7 +110,7 @@ namespace xTagService.Providers
|
||||
//
|
||||
if (!queryResult.Items.IsNull() && queryResult.Items.HasChild())
|
||||
{
|
||||
result.Items = ToXTagDtoList(queryResult.Items);
|
||||
result.Items = ToDtoList(queryResult.Items);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace xTagService.Providers
|
||||
}
|
||||
|
||||
//
|
||||
result = ToXTagDto(entitiy);
|
||||
result = ToDto(entitiy);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -182,7 +182,7 @@ namespace xTagService.Providers
|
||||
}
|
||||
|
||||
//
|
||||
result = ToXTagDto(entity);
|
||||
result = ToDto(entity);
|
||||
if (result.IsNullOrDefault())
|
||||
{
|
||||
XException.NotFound.Throw();
|
||||
@@ -232,7 +232,7 @@ namespace xTagService.Providers
|
||||
if (!entities.IsNull() && entities.HasChild())
|
||||
{
|
||||
//
|
||||
result = ToXTagDtoList(entities)
|
||||
result = ToDtoList(entities)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ namespace xTagService.Providers
|
||||
var entitiy = await Repository.FindOneAsync(whereClause);
|
||||
if (!entitiy.IsNullOrDefault())
|
||||
{
|
||||
result = ToXTagDto(entitiy);
|
||||
result = ToDto(entitiy);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -276,7 +276,7 @@ namespace xTagService.Providers
|
||||
if (!entities.IsNull() || entities.HasChild())
|
||||
{
|
||||
//
|
||||
result = ToXTagDtoList(entities)
|
||||
result = ToDtoList(entities)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ namespace xTagService.Providers
|
||||
var queryResult = await Repository.QueryAsync(query);
|
||||
if (!queryResult.IsNull())
|
||||
{
|
||||
result = ToXTagDtoQueryResult(queryResult);
|
||||
result = ToDtoQueryResult(queryResult);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -326,7 +326,7 @@ namespace xTagService.Providers
|
||||
);
|
||||
if (!queryResult.IsNull())
|
||||
{
|
||||
result = ToXTagDtoQueryResult(queryResult);
|
||||
result = ToDtoQueryResult(queryResult);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -365,7 +365,7 @@ namespace xTagService.Providers
|
||||
XTagDto result = null;
|
||||
if (!entity.IsNullOrDefault())
|
||||
{
|
||||
result = ToXTagDto(entity);
|
||||
result = ToDto(entity);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -424,7 +424,7 @@ namespace xTagService.Providers
|
||||
entity = await Repository.UpdateAsync(id, entity);
|
||||
if (!entity.IsNullOrDefault())
|
||||
{
|
||||
result = ToXTagDto(entity);
|
||||
result = ToDto(entity);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user