예제 #1
0
        protected override void LoadTestData()
        {
            var resource = new AllReady.Models.Resource {
                Id = 2, Name = "ResourceName"
            };

            Context.Resources.Add(resource);

            Context.SaveChanges();
        }
예제 #2
0
        public ResourceDeleteViewModel(AllReady.Models.Resource resource)
        {
            if (resource == null)
            {
                return;
            }

            Id          = resource.Id;
            CampaignId  = resource.CampaignId;
            Name        = resource.Name;
            ResourceUrl = resource.ResourceUrl;
        }
예제 #3
0
        public ResourceDetailViewModel(AllReady.Models.Resource resource)
        {
            if (resource == null)
            {
                return;
            }

            Id           = resource.Id;
            CampaignId   = resource.CampaignId;
            CampaignName = resource.Campaign?.Name;
            Name         = resource.Name;
            Description  = resource.Description;
            ResourceUrl  = resource.ResourceUrl;
        }