public async Task <StockSectorModel> AddSector(StockSectorModel sectorModel) { var sector = new STOCK_SECTOR { SECTOR_NAME = sectorModel.SectorName }; dbContext.StockSectors.Add(sector); await dbContext.SaveChangesAsync(); return(new StockSectorModel { SectorName = sector.SECTOR_NAME, SectorId = sector.STOCK_SECTOR_ID }); }
public async Task <StockSectorModel> AddSector(StockSectorModel sector) { return(await stockSectorRepository.AddSector(sector)); }