DocSas/PropertyService.Domain/ModelView/NewsPosts/NewsPostProvider.cs
/// <summary>
/// get news posts as an asynchronous operation.
/// </summary>
/// <param name="userId">The user identifier.</param>
/// <param name="propertyId">The property identifier.</param>
/// <returns>Task&lt;DSCResponse&gt;.</returns>
get news posts as an asynchronous operation.
get news posts as an asynchronous operation .
public async Task<DSCResponse> GetNewsPostsAsync(Guid userId, Guid propertyId)
        {
            var msg = new Dictionary<string, string>();
            var response = new DSCResponse();
            IEnumerable<PostVM> news = null;
            var user = await _appCommon.GetUserAsync(userId);
            if (user != null)
            {
                news = await _newsPostRepo.GetQueryAsync<PostVM>("GetNewPosts", new Dictionary<string, object>() {
                        {"recordCount", DataUtil.DefaultNumberOfRows },
                        {"propertyId",propertyId },
                        {"userType",user.UserTypeEnum }
                    });
            }
            response.ResponseData = news;
            return response;
        }
public async Task < DSCResponse > GetNewsPostsAsync ( Guid userId , Guid propertyId ) { var msg = new Dictionary < string , string > ( ) ; var response = new DSCResponse ( ) ; IEnumerable < PostVM > news = null ; var user = await _appCommon . GetUserAsync ( userId ) ; if ( user != null ) { news = await _newsPostRepo . GetQueryAsync < PostVM > ( " " , new Dictionary < string , object > ( ) { { " " , DataUtil . DefaultNumberOfRows } , { " " , propertyId } , { " " , user . UserTypeEnum } } ) ; } response . ResponseData = news ; return response ; }
get news posts as an asynchronous operation.
get news posts as an asynchronous operation .
None
userId
Guid
The user identifier.
The user identifier .
propertyId
Guid
The property identifier.
The property identifier .