-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 28f65dd
Showing
94 changed files
with
13,474 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Microsoft.AspNetCore.Http; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Roofcare_APIs.Data; | ||
using Roofcare_APIs.Services; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
|
||
namespace Roofcare_APIs.Controllers | ||
{ | ||
[Route("api/[controller]")] | ||
[ApiController] | ||
public class UserController : ControllerBase | ||
{ | ||
private UserService _userService; | ||
public UserController(RoofCareDbContext roofCareDbContext) | ||
{ | ||
_userService = new UserService(roofCareDbContext); | ||
} | ||
[HttpGet] | ||
public IActionResult Get() | ||
{ | ||
return Ok(UserService.getUsers()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Microsoft.EntityFrameworkCore; | ||
using Roofcare_APIs.Models; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
|
||
namespace Roofcare_APIs.Data | ||
{ | ||
public class RoofCareDbContext : DbContext | ||
{ | ||
public RoofCareDbContext(DbContextOptions<RoofCareDbContext> options) : base(options) | ||
{ | ||
|
||
} | ||
|
||
public DbSet<User> Users { get; set; } | ||
public DbSet<Booking> Bookings { get; set; } | ||
public DbSet<Favorite> Favorites { get; set; } | ||
public DbSet<Feedback> Feedbacks { get; set; } | ||
public DbSet<Offer> Offers { get; set; } | ||
public DbSet<OfferReport> OfferReports { get; set; } | ||
public DbSet<Profession> Professions { get; set; } | ||
public DbSet<SavedOffer> SavedOffers { get; set; } | ||
public DbSet<UserProfession> UserProfessions { get; set; } | ||
} | ||
} |
Oops, something went wrong.