Skip to content

Commit ff9fd86

Browse files
committed
finally (did not test all after model changes)
1 parent b2218c5 commit ff9fd86

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,18 +326,21 @@ edgedb ui
326326

327327
Once you loaded project you could use it in current application:
328328

329-
1. Add proper connection string in the database section in `appsettings.Development.json`config file:
329+
1. Add proper Project Name in `appsettings.Development.json`config file:
330330
```json
331331
"Application": {
332332
"Database": {
333-
"ConnStr": "edgedb://edgedb:VcJjK6blkKAV2MUTdJXzLPvS@localhost:10702/edgedb"
334-
}
333+
"ProjectName": "Wissance_WeatherControl"
335334
}
335+
}
336336
```
337337

338-
configuration string must have the following scheme: `edgedb://user:password@host:port/database`
339-
you could see your project credential on `Windows` machine in a directory:
340-
`%USER_PROFILE%\AppData\Local\EdgeDB\config\credentials`
338+
See how configuration works via project Name [here](https://github.com/Wissance/EdgeDb.Net.Configurator)
339+
340+
This package build connnection string using following scheme: `edgedb://user:password@host:port/database`
341+
you could see your project credential on:
342+
* `Windows` machine in a directory: `%USER_PROFILE%\AppData\Local\EdgeDB\config\credentials`
343+
* `Linux` machine in a directory `$HOME/.config/edgedb/credential`
341344

342345
#### 4.2 REST API With Edge DB
343346

@@ -360,7 +363,7 @@ All controllers are located in a folder `Controllers`, just look how simply look
360363
```csharp
361364
namespace Wissance.WeatherControl.WebApi.V2.Controllers
362365
{
363-
public class MeasurementController : BasicCrudController<MeasurementDto, MeasurementEntity, Guid>
366+
public class MeasurementController : BasicCrudController<MeasurementDto, MeasurementEntity, Guid, , MeasureUnitFilterable>
364367
{
365368
public MeasurementController(EdgeDBClient edgeDbClient)
366369
{

WeatherControl/Wissance.WeatherControl.WebApi.V2/Helpers/EqlResolver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ private string GetSortOption(SortOption sorting = null)
151151

152152
private readonly IDictionary<ModelType, string> _bulkInsertQuery = new Dictionary<ModelType, string>()
153153
{
154-
{ ModelType.Measurement, @"FOR x IN {{json_array_unpack(<json>$data) }} UNION (INSERT Measurement {{id:=<uuid>x['id'], SampleDate:=<datetime>x['SampleDate'], Value:=to_decimal(<str>x['Value']), Unit:=(SELECT MeasureUnit {{id}} FILTER .id = <uuid>x['MeasureUnitId']), Sensor:=(SELECT Sensor {{id}} FILTER .id = <uuid>x['SensorId'] LIMIT 1) }});"}
154+
{ ModelType.Measurement, @"FOR x IN {{json_array_unpack(<json>$data) }} UNION (INSERT Measurement {{id:=<uuid>x['id'], SampleDate:=<datetime>x['SampleDate'], Value:=to_decimal(<str>x['Value']), Sensor:=(SELECT Sensor {{id}} FILTER .id = <uuid>x['SensorId'] LIMIT 1) }});"}
155155
};
156156

157157
private readonly IDictionary<ModelType, string> _updateQuery = new Dictionary<ModelType, string>()

0 commit comments

Comments
 (0)