コード例 #1
0
        public bool Update(LinkRedirection model)
        {
            try
            {
                this.Context.LinkRedirection.Update(model);
                this.Context.SaveChanges();

                return(true);
            }
            catch (Exception ex)
            {
                Log.Fatal(ex);
                throw new Exception("DB error", ex.InnerException);
            }
        }
コード例 #2
0
        public LinkRedirection Create(LinkRedirection model)
        {
            try
            {
                Context.LinkRedirection.Add(model);
                Context.SaveChanges();

                return(model);
            }
            catch (Exception ex)
            {
                log.Fatal(ex);
                throw new Exception("DB error", ex.InnerException);
            }
        }