Hi Ventzi,
Unfortunately I am unable to run the provided updated sample. An error is generated as follows:
System.Windows.Markup.XamlParseException occurred
Message=The invocation of the constructor on type 'ScheduleView_DB_CS.ViewModel.ScheduleViewViewModel' that matches the specified binding constraints threw an exception. [Line: 11 Position: 37]
LineNumber=11
LinePosition=37
StackTrace:
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at ScheduleView_DB_CS.MainPage.InitializeComponent()
at ScheduleView_DB_CS.MainPage..ctor()
InnerException: System.ArgumentException
Message=The provided URI scheme 'file' is invalid; expected 'http'.
Parameter name: via
StackTrace:
at System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
at System.ServiceModel.Channels.HttpChannelFactory.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
at System.ServiceModel.Channels.HttpChannelFactory.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
at System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
at System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
at System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
at System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
at System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
at System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
at System.ServiceModel.ChannelFactory`1.CreateChannel()
at System.ServiceModel.DomainServices.Client.WebDomainClient`1.BeginQueryCore(EntityQuery query, AsyncCallback callback, Object userState)
at System.ServiceModel.DomainServices.Client.DomainClient.BeginQuery(EntityQuery query, AsyncCallback callback, Object userState)
at System.ServiceModel.DomainServices.Client.DomainContext.Load(EntityQuery query, LoadBehavior loadBehavior, Action`1 callback, Object userState)
at System.ServiceModel.DomainServices.Client.DomainContext.Load[TEntity](EntityQuery`1 query)
at ScheduleView_DB_CS.ViewModel.ScheduleViewViewModel.LoadData()
at ScheduleView_DB_CS.ViewModel.ScheduleViewViewModel..ctor()
InnerException:
If I simply try and recode the older demo, I still do not find that the historical data loads correctly after updating what I can identify from the newer sample. If you would please advise.
Thanks,
Mark
-----------
UPDATE
-----------
This "updated" demo code also causes an exception within the designer causing it not to render which is the known RIA design time issue.
In trying to understand your code, you have the following function:
It would seem that if there are no changes that the load does not fire when changing the current viewable date range.
---------------
UPDATE 2
---------------
I was able to make those minor adjustments on the Web properties page to get the newer sample to initially compile and launch
(It seems the database schema has also changed since the earlier sample.)
On starting the sample, however, I am presented with the following error:
System.Data.EntityCommandCompilationException was unhandled by user code
HResult=-2146232005
Message=An error occurred while preparing the command definition. See the inner exception for details.
Source=System.Data.Entity
StackTrace:
at System.Data.EntityClient.EntityCommandDefinition..ctor(DbProviderFactory storeProviderFactory, DbCommandTree commandTree)
at System.Data.EntityClient.EntityProviderServices.CreateCommandDefinition(DbProviderFactory storeProviderFactory, DbCommandTree commandTree)
at System.Data.EntityClient.EntityProviderServices.CreateDbCommandDefinition(DbProviderManifest providerManifest, DbCommandTree commandTree)
at System.Data.Common.DbProviderServices.CreateCommandDefinition(DbCommandTree commandTree)
at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Prepare(ObjectContext context, DbQueryCommandTree tree, Type elementType, MergeOption mergeOption, Span span, ReadOnlyCollection`1 compiledQueryParameters, AliasGenerator aliasGenerator)
at System.Data.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<
T
>.GetEnumerator()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at ScheduleView_DB_CS.Web.ScheduleViewDomainService.GetSqlAppointmentsIdsByRange(DateTime start, DateTime end) in C:\Users\Mark\Desktop\2115e45d-0e39-4227-82f7-69226f50ec9b_ScheduleView-DB-CS\ScheduleView_DB_CS.Web\ScheduleViewDomainService.cs:line 374
at ScheduleView_DB_CS.Web.ScheduleViewDomainService.GetSqlAppointmentsByRange(DateTime start, DateTime end) in C:\Users\Mark\Desktop\2115e45d-0e39-4227-82f7-69226f50ec9b_ScheduleView-DB-CS\ScheduleView_DB_CS.Web\ScheduleViewDomainService.cs:line 62
at GetSqlAppointmentsByRange(DomainService , Object[] )
at System.ServiceModel.DomainServices.Server.ReflectionDomainServiceDescriptionProvider.ReflectionDomainOperationEntry.Invoke(DomainService domainService, Object[] parameters)
at System.ServiceModel.DomainServices.Server.DomainOperationEntry.Invoke(DomainService domainService, Object[] parameters, Int32& totalCount)
at System.ServiceModel.DomainServices.Server.DomainService.Query(QueryDescription queryDescription, IEnumerable`1& validationErrors, Int32& totalCount)
InnerException: System.Data.MappingException
HResult=-2146232032
Message=
ScheduleViewDataModel.msl(3,4) : error 3027: No mapping specified for the following EntitySet/AssociationSet - SqlAppointmentResources, SqlAppointments, SqlExceptionAppointments, SqlExceptionOccurrences, SqlExceptionResources, SqlResources, SqlResourceTypes.
Source=System.Data.Entity
StackTrace:
at System.Data.Mapping.StorageMappingItemCollection.ViewDictionary.SerializedGenerateViews(StorageEntityContainerMapping entityContainerMap, Dictionary`2 resultDictionary)
at System.Data.Mapping.StorageMappingItemCollection.ViewDictionary.SerializedGetGeneratedViews(EntityContainer container)
at System.Data.Common.Utils.Memoizer`2.<>c__DisplayClass2.<
Evaluate
>b__0()
at System.Data.Common.Utils.Memoizer`2.Result.GetValue()
at System.Data.Common.Utils.Memoizer`2.Evaluate(TArg arg)
at System.Data.Mapping.StorageMappingItemCollection.ViewDictionary.GetGeneratedView(EntitySetBase extent, MetadataWorkspace workspace, StorageMappingItemCollection storageMappingItemCollection)
at System.Data.Metadata.Edm.MetadataWorkspace.GetGeneratedView(EntitySetBase extent)
at System.Data.Query.PlanCompiler.PreProcessor.ExpandView(Node node, ScanTableOp scanTableOp, IsOfOp& typeFilter)
at System.Data.Query.PlanCompiler.PreProcessor.ProcessScanTable(Node scanTableNode, ScanTableOp scanTableOp, IsOfOp& typeFilter)
at System.Data.Query.PlanCompiler.PreProcessor.Visit(ScanTableOp op, Node n)
at System.Data.Query.InternalTrees.ScanTableOp.Accept[TResultType](BasicOpVisitorOfT`1 v, Node n)
at System.Data.Query.InternalTrees.BasicOpVisitorOfT`1.VisitNode(Node n)
at System.Data.Query.PlanCompiler.SubqueryTrackingVisitor.VisitChildren(Node n)
at System.Data.Query.PlanCompiler.SubqueryTrackingVisitor.VisitRelOpDefault(RelOp op, Node n)
at System.Data.Query.PlanCompiler.PreProcessor.Visit(FilterOp op, Node n)
at System.Data.Query.InternalTrees.FilterOp.Accept[TResultType](BasicOpVisitorOfT`1 v, Node n)
at System.Data.Query.InternalTrees.BasicOpVisitorOfT`1.VisitNode(Node n)
at System.Data.Query.PlanCompiler.SubqueryTrackingVisitor.VisitChildren(Node n)
at System.Data.Query.InternalTrees.BasicOpVisitorOfNode.VisitDefault(Node n)
at System.Data.Query.InternalTrees.BasicOpVisitorOfNode.VisitPhysicalOpDefault(PhysicalOp op, Node n)
at System.Data.Query.InternalTrees.BasicOpVisitorOfT`1.Visit(PhysicalProjectOp op, Node n)
at System.Data.Query.InternalTrees.PhysicalProjectOp.Accept[TResultType](BasicOpVisitorOfT`1 v, Node n)
at System.Data.Query.InternalTrees.BasicOpVisitorOfT`1.VisitNode(Node n)
at System.Data.Query.PlanCompiler.PreProcessor.Process(Dictionary`2& tvfResultKeys)
at System.Data.Query.PlanCompiler.PreProcessor.Process(PlanCompiler planCompilerState, StructuredTypeInfo& typeInfo, Dictionary`2& tvfResultKeys)
at System.Data.Query.PlanCompiler.PlanCompiler.Compile(List`1& providerCommands, ColumnMap& resultColumnMap, Int32& columnCount, Set`1& entitySets)
at System.Data.EntityClient.EntityCommandDefinition..ctor(DbProviderFactory storeProviderFactory, DbCommandTree commandTree)
InnerException:
{"\r\nScheduleViewDataModel.msl(3,4) : error 3027: No mapping specified for the following EntitySet/AssociationSet - SqlAppointmentResources, SqlAppointments, SqlExceptionAppointments, SqlExceptionOccurrences, SqlExceptionResources, SqlResources, SqlResourceTypes."}