Exemple #1
0
        public async Task <ActionResult <CollectionViewModel <Vessel> > > Get(
            string company,
            [FromQuery] string code             = null,
            [FromQuery] string description      = null,
            [FromQuery] bool includeDeactivated = false,
            [FromQuery] string viewMode         = MasterDataViewMode.Local)
        {
            var vessels = await _vesselRepository.GetAllAsync(viewMode == MasterDataViewMode.Local?company : null, includeDeactivated, code, description);

            var response = new CollectionViewModel <Vessel>(vessels.ToList());

            return(Ok(response));
        }