You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Map("DatabaseCheckActivity")]
public class DatabaseCheckActivityAllocation
{
public Guid Id { get; set; }
public long LargePageAllocationsInKb { get; set; }
public long LockedPageAllocationsInKb { get; set; }
public long TotalVirtualAddressSpaceInKb { get; set; }
public long VirtualAddressSpaceReservedInKb { get; set; }
public long VirtualAddressSpaceCommittedInKb { get; set; }
public long VirtualAddressSpaceAvailableInKb { get; set; }
}
var allocation = _serviceMonitorRepository
.Query<WebModels.DatabaseCheckActivityAllocation>(new { Id = databaseCheckId })
.Select(databaseCheckActivity => Convert(databaseCheckActivity))
.FirstOrDefault();
Result: The allocation.Id is an Empty Guid
The text was updated successfully, but these errors were encountered:
/****** Object: Table [dbo].[TestTable] Script Date: 11/10/2018 7:52:14 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TestTable](
[Id] [uniqueidentifier] NOT NULL,
[Value] nvarchar NOT NULL,
CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT INTO [dbo].[TestTable] ([Id], [Value]) SELECT NEWID(), 'Test-1';
INSERT INTO [dbo].[TestTable] ([Id], [Value]) SELECT NEWID(), 'Test-2';
INSERT INTO [dbo].[TestTable] ([Id], [Value]) SELECT NEWID(), 'Test-3';
using RepoDb;
using RepoDb.Attributes;
using System;
using System.Data.SqlClient;
namespace TestQueryRepoDb
{
[Map("TestTable")]
public class Test
{
public Guid Id { get; set; }
public string Value { get; set; }
}
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
using (var connection = new SqlConnection("Server=.;Database=TestDb;Integrated Security=True;"))
{
var tests = connection.Query<Test>();
}
}
}
[Map("DatabaseCheckActivity")]
public class DatabaseCheckActivityAllocation
{
public Guid Id { get; set; }
public long LargePageAllocationsInKb { get; set; }
public long LockedPageAllocationsInKb { get; set; }
public long TotalVirtualAddressSpaceInKb { get; set; }
public long VirtualAddressSpaceReservedInKb { get; set; }
public long VirtualAddressSpaceCommittedInKb { get; set; }
public long VirtualAddressSpaceAvailableInKb { get; set; }
}
var allocation = _serviceMonitorRepository
.Query<WebModels.DatabaseCheckActivityAllocation>(new { Id = databaseCheckId })
.Select(databaseCheckActivity => Convert(databaseCheckActivity))
.FirstOrDefault();
Result: The allocation.Id is an Empty Guid
The text was updated successfully, but these errors were encountered: