コード例 #1
0
        public ActionResult GetByEmail(string email)
        {
            var user     = vendorService.GetByEmail(email);
            var response = new ResponseModel
            {
                StatusCode = (int)(user?.Id > 0 ? HttpStatusCode.Found : HttpStatusCode.NotFound),
                MessageAr  = user?.Id > 0 ? AppResource.EmailAlreadyTaken : string.Empty
            };

            return(Json(response, JsonRequestBehavior.AllowGet));
        }