public void AddCompetativeStock(CompetatorStock competativestock) { var _storevisit = Table.FirstOrDefault(o => o.StoreVisitId == competativestock.StoreVisitId); _storevisit.CompetatorStocks.Add(competativestock); Update(_storevisit); }
public IActionResult AddCompetativeStock([FromBody] CompetatorStock stock) { Repo.AddCompetativeStock(stock); return(Ok(new { CompetativeStockId = stock.CompetatorStockId })); }