public override Guid Create(Entity entity)
        {
            Guid id;

            if (CreateFunc != null)
            {
                id = CreateFunc(Service, entity);
            }
            else if (CreateFuncs != null)
            {
                if (CreateCache == null)
                {
                    CreateCache = Service;
                    foreach (var create in CreateFuncs)
                    {
                        CreateCache = new FakeIOrganizationService(CreateCache)
                        {
                            CreateFunc = create
                        };
                    }
                }
                id = CreateCache.Create(entity);
            }
            else
            {
                id = ExecutionTracingEnabled ? Timer.Time(CreateInternal, entity, "Create {0}: {1}", entity.GetNameId()) : Service.Create(entity);
            }
            return(id);
        }
예제 #2
0
        public ActionResult Connect(ConnectionString model)
        {
            ////ilk açılış cache'i tetikledik
            //CreateCache.Create();
            ////we are updating connection string on web.config
            var updatedResult = UpdateConfig.update(model.connectionString);

            CreateDB.create();
            CreateCache.Create();
            //return RedirectToAction("Product", "Index");
            return(RedirectToAction("List", "Home"));
        }
예제 #3
0
        public ActionResult Index()

        {
            var exist = _con.Database.Exists();

            if (exist == true)
            {
                CreateCache.Create();
                return(RedirectToAction("List", "Home"));
            }
            else
            {
                return(RedirectToAction("Connect", "Home"));
            }
            return(View());
        }
예제 #4
0
 public static bool CanCreate <T>(object instance)
 {
     return(CreateCache <T> .CanCreate(instance));
 }
예제 #5
0
 public static bool CanCreate <T>(object instance) => CreateCache <T> .CanCreate(instance);
예제 #6
0
 public static T Create <T>(object instance) => CreateCache <T> .Create(instance);