public async Task <Result> GetProductByIdAsync(string productId, string[] fields = null) { FilterDefinitionBuilder <BsonDocument> builder = Builders <BsonDocument> .Filter; FilterDefinition <BsonDocument> filter = builder.Eq("_id", ObjectId.Parse(productId)); Product product = await service.GetSingleProductAsync(filter, fields); if (product == null) { return new Result { status = Status.BadRequest, data = Messages.NotExistedUser } } ; return(new Result { status = Status.OK, data = product }); } }