public string Update(Company entity)
 {
     var originalEntity = this.Context.Companies.Find(entity.Id);
     this.Context.Entry(originalEntity).CurrentValues.SetValues(entity);
     this.Context.Entry(originalEntity).State = EntityState.Modified;
     this.Commit();
     return entity.Id.ToString();
 }
 public string Insert(Company entity)
 {
     this.Context.Companies.Add(entity);
     this.Commit();
     return entity.Id.ToString();
 }
예제 #3
0
 public string Update(Company entity)
 {
     return this.repository.Update(entity);
 }
예제 #4
0
 public CompanyModel(Company entity)
 {
     this.Id = entity.Id;
     this.Name = entity.Name;
 }
예제 #5
0
 public string Insert(Company entity)
 {
     return this.repository.Insert(entity);
 }