Changeset d2e69be for Farmatiko


Ignore:
Timestamp:
07/27/20 17:10:07 (4 years ago)
Author:
DimitarSlezenkovski <dslezenkovski@…>
Branches:
master
Children:
ef1219a
Parents:
4b342bb
Message:

Add Route Attribute

Location:
Farmatiko
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • Farmatiko/ClientApp/src/app/counter/counter.component.html

    r4b342bb rd2e69be  
    1717        </thead>
    1818        <tbody>
    19             <tr *ngFor="let facility of facilities">
     19          <tr *ngFor="let facility of facilities">
    2020            <td>{{ facility.Name }}</td>
    21             <td>{{ facility.Municipality }}</td>
    22             <td>{{ facility.Address }}</td>
    23             <td>{{ facility.Type }}</td>
    24             <td>{{ facility.Email }}</td>
    25             <td>{{ facility.Phone }}</td>
    26             </tr>
     21            <!--
     22  <td>{{ facility.Municipality }}</td>
     23  <td>{{ facility.Address }}</td>
     24  <td>{{ facility.Type }}</td>
     25  <td>{{ facility.Email }}</td>
     26  <td>{{ facility.Phone }}</td>-->
     27            <td>facility.Municipality</td>
     28            <td></td>
     29            <td></td>
     30            <td></td>
     31            <td>
     32             
     33            </td>
     34
     35          </tr>
    2736        </tbody>
    2837    </table>
  • Farmatiko/ClientApp/src/app/counter/counter.component.ts

    r4b342bb rd2e69be  
    1111
    1212  constructor(http: HttpClient, @Inject('BASE_URL') baseUrl: string) {
    13     http.get<HealthFacilities[]>(baseUrl + 'HealthFacilities').subscribe(result => {
     13    http.get<HealthFacilities[]>(baseUrl + 'HealthFacilities/Get?').subscribe(result => {
    1414      this.facilities = result;
     15      console.log(this.facilities);
    1516    }, error => console.error(error));
    16   } 
     17  }
    1718}
     19/*interface healthFacilities {
     20  Name: string;
     21  Municipality: string;
     22  Address: string;
     23  Type: string;
     24  Email: string;
     25  Phone: string;
     26}*/
     27
  • Farmatiko/Farmatiko.csproj

    r4b342bb rd2e69be  
    3636  <ItemGroup>
    3737    <ProjectReference Include="..\FarmatikoData\FarmatikoData.csproj" />
     38    <ProjectReference Include="..\FarmatikoServices\FarmatikoServices.csproj" />
    3839  </ItemGroup>
    3940
  • Farmatiko/Startup.cs

    r4b342bb rd2e69be  
    88using FarmatikoData;
    99using Microsoft.EntityFrameworkCore;
     10using FarmatikoServices;
     11using FarmatikoData.FarmatikoRepoInterfaces;
     12using FarmatikoData.FarmatikoRepo;
    1013
    1114namespace Farmatiko
     
    3235            services.AddEntityFrameworkNpgsql().AddDbContext<FarmatikoDataContext>(opt => opt.UseNpgsql(connectionString));
    3336
     37            services.AddTransient<IHealthFacilityRepository, HealthFacilityRepository>();
     38            services.AddTransient<IHealthFacilityService, HealthFacilityService>();
    3439        }
    3540
Note: See TracChangeset for help on using the changeset viewer.