AsyncPoco.Tests.Tests.deco_ExplicitAttribute C# (CSharp) Method

deco_ExplicitAttribute() private method

private deco_ExplicitAttribute ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
		public async Task deco_ExplicitAttribute()
		{
			// Create a records
			long id = await InsertRecordsAsync(1);

			// Retrieve it in two different ways
			var a = await db.SingleOrDefaultAsync<deco>("WHERE id=@0", id);
			var b = await db.SingleOrDefaultAsync<deco_explicit>("WHERE id=@0", id);
			var c = await db.SingleOrDefaultAsync<deco_explicit>("SELECT * FROM petapoco WHERE id=@0", id);

			// b record should have ignored the content
			Assert.IsNotNull(a.content);
			Assert.IsNull(b.content);
			Assert.IsNull(c.content);
		}