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); } }
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); } }