Beispiel #1
0
        public void DeleteEntity()
        {
            EAV.Store.Clients.IEntityStoreClient client = factory.Create <EAV.Store.Clients.IEntityStoreClient>();
            EAVStoreClient.Entity dbEntityIn            = CreateEntity(Guid.NewGuid().ToString());

            client.DeleteEntity(dbEntityIn.Entity_ID);

            EAVStoreClient.Entity dbEntityOut = this.DbContext.Entities.SingleOrDefault(it => it.Entity_ID == dbEntityIn.Entity_ID);

            Assert.IsNull(dbEntityOut, "Failed to delete entity ID {0} from the database.", dbEntityIn.Entity_ID);
        }
Beispiel #2
0
        public IHttpActionResult DeleteEntity(int id)
        {
            try
            {
                entityClient.DeleteEntity(id);

                return(Ok());
            }
            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
        }