public string Update(SetOfBook entity)
 {
     var orignalEntity = this.Context.SetOfBooks.Find(entity.Id);
     this.Context.Entry(orignalEntity).CurrentValues.SetValues(entity);
     this.Context.Entry(orignalEntity).State = EntityState.Modified;
     this.Commit();
     return entity.Id.ToString();
 }
 public SetOfBookModel(SetOfBook entity)
 {
     if (entity != null)
     {
         this.Id = entity.Id;
         this.CompanyId = entity.CompanyId;
         this.Name = entity.Name;
     }
 }
 public string Update(SetOfBook entity)
 {
     return this.repository.Update(entity);
 }
 public string Insert(SetOfBook entity)
 {
     return this.repository.Insert(entity);
 }
 public string Insert(SetOfBook entity)
 {
     this.Context.SetOfBooks.Add(entity);
     this.Commit();
     return entity.Id.ToString();
 }