예제 #1
0
        public async Task <ActionResult> Create(Matter matter)
        {
            var requestHandler = new RequestManager();

            try
            {
                // TODO: Add insert logic here
                if (ModelState.IsValid)
                {
                    requestHandler.CreateRequest(matter);

                    repository.Save(matter);

                    return(RedirectToAction("Index"));
                }
                else
                {
                    return(View());
                }
            }
            catch
            {
                return(View());
            }
        }
예제 #2
0
        public int Save(Matter matter)
        {
            MatterRepository repository = new MatterRepository();

            return(repository.Save(matter));
        }