Exemple #1
0
        internal static T FindById <T>(ServiceContext context, T entity) where T : IEntity
        {
            DataService.DataService service = new DataService.DataService(context);
            T foundEntity = service.FindById(entity);

            return(foundEntity);
        }
Exemple #2
0
        internal static T Void <T>(ServiceContext context, T entity) where T : IEntity
        {
            //Initializing the Dataservice object with ServiceContext
            DataService.DataService service = new DataService.DataService(context);

            //Voiding the entity using the service
            service.Void <T>(entity);

            try
            {
                //Retrieving the voided entity
                T found = service.FindById <T>(entity);
                Assert.IsNotNull(found);
                return(found);
            }
            catch (IdsException)
            {
            }

            return(entity);
        }