This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I'm getting the error "The method or operation is not implemented." when i run this simple uow.add Lawrence l = new Lawrence(); Any ideas? |
|
|
Correction: Im getting the exception on the next line: Lawrence l = new Lawrence();
|
|
|
Hi Lawrence, Sounds like something will be mis-configured as that is indeed a simple call but there are some providers (such as SimpleDB) where you will need to make sure you are following certain conventions otherwise you may get a NotSupported/NotImplemented exception. Can you add the exception stack trace please? And if you could let us know which provider and version you are using that would be very helpful in helping to diagnose this.
Jeremy |
|
|
I was thinking maybe it had something to do with how Identity is assigned.
app.config: <add name="MyAmazon"
-------- Stack Trace:
" at ..CreateCommand()\r\n at \b...ctor(LightSpeedContext )\r\n at Mindscape.LightSpeed.Data.DataProviderAdapter.(LightSpeedContext )\r\n at ..(Entity , )\r\n at ..(Entity , ICollection`1 )\r\n at ..(Entity , List`1 )\r\n at ..(UnitOfWorkBase , IEnumerable`1 , IEnumerable`1 )\r\n at Mindscape.LightSpeed.UnitOfWork.SaveChanges(Boolean reset)\r\n at Mindscape.LightSpeed.UnitOfWorkBase.SaveChanges()\r\n at Analytics.Program.Main(String[] args) in D:\\Projects\\SceneStealer\\Analytics\\Program.cs:line 60\r\n at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)\r\n at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)\r\n at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()\r\n at System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Threading.ThreadHelper.ThreadStart()"
|
|
|
Lawrence, yes, this is an identity issue. IdentityColumn means the ID will be assigned by the database, e.g. a SQL Server or MySQL autoincrement column. SimpleDB does not assign IDs: it is up to the client to assign an item name. The easiest way to assign IDs with LightSpeed on SimpleDB is to use GUIDs. So change the identityMethod setting in the config file to: identityMethod="Guid" and declare your entities as deriving from Entity<Guid> rather than Entity<int> or Entity<string>: public class Lawrence : Entity<Guid> (If using the designer, you do this by setting the Identity Type in the properties window.) Note that the GUID solution will not work if you have existing entries with non-GUID item names. If that's the case, let me know and I'll fill you in on possible alternative approaches. |
|
|
Almost there! I am now getting an exception from amazon "The specified domain does not exist." The domain definitely does exist because I created the diagram model from it and also tried it with another domain entitiy that I created with the same properties.. hmmmmm |
|
|
Could this be a pluralisation issue? Again, turning on logging (uow.Context.Logger = new TraceLogger()) often helps to diagnose this kind of problem. |
|