Init
This commit is contained in:
24
Repository/StockRepository.cs
Normal file
24
Repository/StockRepository.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using api.Data;
|
||||
using api.Interfaces;
|
||||
using api.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace api.Repository
|
||||
{
|
||||
public class StockRepository : IStockRepository
|
||||
{
|
||||
private readonly ApplicationDbContext _context;
|
||||
public StockRepository(ApplicationDbContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public Task<List<Stock>> GetAllAsync()
|
||||
{
|
||||
return _context.Stocks.ToListAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user