Example #1
0
        public bool Insert(TStoreVM entity)
        {
            TSTORE tstore = Mapper.Map <TStoreVM, TSTORE>(entity);
            TSTORE ts     = tStoreRepo.Add(tstore);

            return(ts != null ? true : false);
        }
Example #2
0
        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);
        }
Example #3
0
 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;
     }));
 }
Example #4
0
 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;
     }));
 }
Example #5
0
        public bool Delete(TStoreVM entity)
        {
            TSTORE tstore = new TSTORE
            {
                TSTORE_ID = entity.TSTORE_ID
            };

            tStoreRepo.Delete(tstore, entity.TSTORE_ID);
            return(true);
        }
Example #6
0
        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;
            }));
        }