public bool Insert(TStoreVM entity) { TSTORE tstore = Mapper.Map <TStoreVM, TSTORE>(entity); TSTORE ts = tStoreRepo.Add(tstore); return(ts != null ? true : false); }
public bool Update(TStoreVM entity) { TSTORE tstore = Mapper.Map <TStoreVM, TSTORE>(entity); TSTORE ts = tStoreRepo.Update(tstore, tstore.TSTORE_ID); return(ts != null ? true : false); }
public Task <bool> InsertAsync(TStoreVM entity) { return(Task.Run <bool>(() => { TSTORE tstore = Mapper.Map <TStoreVM, TSTORE>(entity); TSTORE ts = tStoreRepo.Add(tstore); return ts != null ? true : false; })); }
public Task <bool> UpdateAsync(TStoreVM entity) { return(Task.Run <bool>(() => { TSTORE tstore = Mapper.Map <TStoreVM, TSTORE>(entity); TSTORE ts = tStoreRepo.Update(tstore, tstore.TSTORE_ID); return ts != null ? true : false; })); }
public bool Delete(TStoreVM entity) { TSTORE tstore = new TSTORE { TSTORE_ID = entity.TSTORE_ID }; tStoreRepo.Delete(tstore, entity.TSTORE_ID); return(true); }
public Task <bool> DeleteAsync(TStoreVM entity) { return(Task.Run <bool>(() => { TSTORE tstore = new TSTORE { TSTORE_ID = entity.TSTORE_ID }; tStoreRepo.Delete(tstore, entity.TSTORE_ID); return true; })); }