Browse Source

README; gitignore; removed lock files

tags/v0.1.3
Robin Thoni 7 years ago
parent
commit
6b38d93426

+ 2
- 0
.gitignore View File

@@ -47,3 +47,5 @@ obj
47 47
 *.pdb
48 48
 
49 49
 /packages
50
+
51
+*.lock.json

+ 0
- 7885
Luticate2.Auth/project.lock.json
File diff suppressed because it is too large
View File


+ 80
- 0
Luticate2.Utils/README.md View File

@@ -0,0 +1,80 @@
1
+# Luticate2 API Utils
2
+
3
+## Install
4
+
5
+NuGet.Config
6
+```xml
7
+<?xml version="1.0" encoding="utf-8"?>
8
+<configuration>
9
+  <packageSources>
10
+    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
11
+    <add key="rthoni" value="http://nuget.rthoni.com" protocolVersion="2" />
12
+  </packageSources>
13
+</configuration>
14
+
15
+```
16
+
17
+project.json
18
+```json
19
+{
20
+    ...
21
+    dependencies": {
22
+        "Luticate2.Utils": "0.1.*",
23
+        ...
24
+    }
25
+    ...
26
+}
27
+```
28
+
29
+appsettings.json
30
+```json
31
+{
32
+    ...
33
+    "ConnectionStrings": {
34
+        "default":  "User ID=POSTGRES_USER;Password=POSTGRES_PASSWORD;Host=POSTGRES_HOST;Port=5432;Database=POSTGRES_DB;Pooling=true;",
35
+        ...
36
+    }
37
+    ...
38
+}
39
+```
40
+
41
+Startup.cs
42
+```C#
43
+public void ConfigureServices(IServiceCollection services)
44
+{
45
+    // ...
46
+
47
+    // MUST be before addMvc()
48
+    services.AddLuticateUtils(options => options.Version = "dev");
49
+
50
+    // ...
51
+
52
+    services.AddDbContext<YourDbContext>(options => // Replace YourDbContext with your own database context
53
+    {
54
+        options.UseNpgsql(Configuration.GetConnectionString("default"));
55
+        options.UseInternalServiceProvider(new ServiceCollection()
56
+            .AddEntityFrameworkNpgsqlLuticate() // MUST be before AddEntityFrameworkNpgsql()
57
+            .AddEntityFrameworkNpgsql()
58
+            .BuildServiceProvider());
59
+    });
60
+
61
+    services.AddMvc()
62
+        .AddLuticateUtils();
63
+        
64
+    // ...
65
+}
66
+
67
+public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
68
+{
69
+    // ...
70
+
71
+    // MUST be before useMvc()
72
+    app.UseLuticateUtils();
73
+
74
+    // ...
75
+}
76
+```
77
+
78
+## Usage
79
+
80
+See WebApiUtils for an example

+ 1
- 1
Luticate2.Utils/project.json View File

@@ -1,5 +1,5 @@
1 1
 {
2
-  "version": "0.1.1",
2
+  "version": "0.1.2",
3 3
   "authors": [
4 4
     "Robin Thoni"
5 5
   ],

+ 0
- 7808
Luticate2.Utils/project.lock.json
File diff suppressed because it is too large
View File


+ 5
- 0
README.md View File

@@ -0,0 +1,5 @@
1
+# Luticate2 API
2
+
3
+## Usage
4
+
5
+See Luticate2.Utils/README.md

+ 0
- 10430
TestUtils/project.lock.json
File diff suppressed because it is too large
View File


+ 0
- 11239
WebApiUtils/project.lock.json
File diff suppressed because it is too large
View File


Loading…
Cancel
Save