public async Task <TransactionPartyEntity> GetTransactionPartyByIdAsync(int id) { string query = "SELECT * FROM `TransactionParty` WHERE `Id` = @Id"; IEnumerable <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> >() { new KeyValuePair <string, object>("@Id", id) }; return(await SqliteConnector.ExecuteQuerySingleOrDefaultAsync(query, ReaderToEntity, parameters)); }
public async Task <ScheduledTasks> GetScheduledTasksByIdAsync(int id) { string query = "SELECT * FROM `ScheduledTasks` WHERE `Id` = @Id"; IEnumerable <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> >() { new KeyValuePair <string, object>("@Id", id) }; return(await SqliteConnector.ExecuteQuerySingleOrDefaultAsync(query, ReaderToEntitySheduledTask, parameters)); }
public async Task <UserEntity> GetUserDetailsAsync() { string query = "SELECT `Id`,`FirstName`,`LastName`,`RegisteredDateTime`,`StartingAmount`,`CurrentBalance`,`LastCheckDateTime` FROM `User` WHERE `SID` = @SID"; IEnumerable <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> >() { new KeyValuePair <string, object>("@SID", System.Security.Principal.WindowsIdentity.GetCurrent().User.Value.ToString()), }; return(await SqliteConnector.ExecuteQuerySingleOrDefaultAsync(query, ReaderToEntity, parameters)); }
public async Task <UserEntity> GetUserDetailsAsync() { string query = "SELECT `Id`,`FirstName`,`LastName`,`RegisteredDateTime`,`StartingAmount`,`CurrentBalance`,`LastCheckDateTime` FROM `User`"; return(await SqliteConnector.ExecuteQuerySingleOrDefaultAsync(query, ReaderToEntity)); }