-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from FrankieTF/Update-DotNetHowToEncryptionUsi…
…ngCMK Update DotNetHowToEncryptionUsingCMK
- Loading branch information
Showing
3 changed files
with
141 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 23 additions & 27 deletions
50
DotNetHowToEncryptionUsingCMK/DotNetHowToEncryptionUsingCMK/Hotel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,52 @@ | ||
namespace AzureSearch.SDKHowTo | ||
using System; | ||
using Microsoft.Spatial; | ||
using Azure.Search.Documents.Indexes; | ||
using Azure.Search.Documents.Indexes.Models; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace AzureSearch.SDKHowTo | ||
{ | ||
using System; | ||
using Microsoft.Azure.Search; | ||
using Microsoft.Azure.Search.Models; | ||
using Microsoft.Spatial; | ||
using Newtonsoft.Json; | ||
|
||
// The SerializePropertyNamesAsCamelCase attribute is defined in the Azure Search .NET SDK. | ||
// It ensures that Pascal-case property names in the model class are mapped to camel-case | ||
|
||
|
||
// The JsonPropertyName attribute is defined in the Azure Search .NET SDK. | ||
// Here it used to ensure that Pascal-case property names in the model class are mapped to camel-case | ||
// field names in the index. | ||
[SerializePropertyNamesAsCamelCase] | ||
public partial class Hotel | ||
{ | ||
[System.ComponentModel.DataAnnotations.Key] | ||
[IsFilterable] | ||
[SimpleField(IsKey = true, IsFilterable = true)] | ||
public string HotelId { get; set; } | ||
|
||
[IsFilterable, IsSortable, IsFacetable] | ||
[SimpleField(IsFilterable = true, IsSortable = true, IsFacetable = true)] | ||
public double? BaseRate { get; set; } | ||
|
||
[IsSearchable] | ||
[SearchableField] | ||
public string Description { get; set; } | ||
|
||
[IsSearchable] | ||
[Analyzer(AnalyzerName.AsString.FrLucene)] | ||
[JsonProperty("description_fr")] | ||
[SearchableField(AnalyzerName = LexicalAnalyzerName.Values.FrLucene)] | ||
public string DescriptionFr { get; set; } | ||
|
||
[IsSearchable, IsFilterable, IsSortable] | ||
[SearchableField(IsFilterable = true, IsSortable = true)] | ||
public string HotelName { get; set; } | ||
|
||
[IsSearchable, IsFilterable, IsSortable, IsFacetable] | ||
[SynonymMaps("desc-synonymmap")] | ||
[SearchableField(IsFilterable = true, IsFacetable = true, IsSortable = true)] | ||
public string Category { get; set; } | ||
|
||
[IsSearchable, IsFilterable, IsFacetable] | ||
[SynonymMaps("desc-synonymmap")] | ||
[SearchableField(IsFilterable = true, IsFacetable = true)] | ||
public string[] Tags { get; set; } | ||
|
||
[IsFilterable, IsFacetable] | ||
[SimpleField(IsFilterable = true, IsFacetable = true)] | ||
public bool? ParkingIncluded { get; set; } | ||
|
||
[IsFilterable, IsFacetable] | ||
[SimpleField(IsFilterable = true, IsFacetable = true)] | ||
public bool? SmokingAllowed { get; set; } | ||
|
||
[IsFilterable, IsSortable, IsFacetable] | ||
[SimpleField(IsFilterable = true, IsSortable = true, IsFacetable = true)] | ||
public DateTimeOffset? LastRenovationDate { get; set; } | ||
|
||
[IsFilterable, IsSortable, IsFacetable] | ||
[SimpleField(IsFilterable = true, IsSortable = true, IsFacetable = true)] | ||
public int? Rating { get; set; } | ||
|
||
[IsFilterable, IsSortable] | ||
[SimpleField(IsFilterable = true, IsSortable = true)] | ||
public GeographyPoint Location { get; set; } | ||
} | ||
} |
Oops, something went wrong.