コード例 #1
0
        public IActionResult Post([FromBody] LoginViewModel model)
        {
            ServiceResponse <Hasta> response = new ServiceResponse <Hasta>();
            Hasta entity = service.GetByHasta(model.Tc, model.Parola);

            if (entity == null)
            {
                response.Errors.Add("Hasta bulunamadı");
                response.HasError = true;
                return(BadRequest(response));
            }
            else
            {
                response.entity       = entity;
                response.IsSuccessful = true;
                return(Ok(response));
            }
        }