示例#1
0
        public async Task <IActionResult> GetTitipanKapal(int Id)
        {
            try
            {
                var result = await context.GetTitipanKapal(Id);

                return(Ok(result));
            }
            catch (Exception ex)
            {
                return(BadRequest(new ErrorMessage(ex.Message)));
            }
        }
示例#2
0
        public async Task <IHttpActionResult> GetTitipanKapal(int Id)
        {
            var result = await context.GetTitipanKapal(Id);

            if (result != null)
            {
                return(Ok(result));
            }
            else
            {
                return(Content(HttpStatusCode.NoContent, "Data Tidak Ditemukan"));
            }
        }