protected override SqlCommand CreateInsertSqlCommand(FlashObservation value) { var sqlCommand = new SqlCommand(FlashObservationQueries.CreateInsertQuery()); SqlCommandHelper.FillFlashObservation(sqlCommand, value); return(sqlCommand); }
protected override SqlCommand GetDeleteCommand(int id) { var sqlCommand = new SqlCommand(FlashObservationQueries.CreateDeleteQuery()); SqlCommandHelper.FillParam(sqlCommand, "@Id", id); return(sqlCommand); }
public void Clear() { using var context = new ObservationsContext(_connectionString); context.Database.ExecuteSqlRaw(FlashObservationQueries.CreateDeleteAllQuery()); }
protected override string GetDeleteAllQuery() => FlashObservationQueries.CreateDeleteAllQuery();
protected override string GetCountQuery() => FlashObservationQueries.CreateGetCountQuery();
protected override string GetInsertQuery() => FlashObservationQueries.CreateInsertQuery();
protected override string GetSelectAllQuery() => FlashObservationQueries.CreateGetAllQuery();
protected override SqlCommand GetCountCommand() => new SqlCommand(FlashObservationQueries.CreateGetCountQuery());