Search Results

Search found 16252 results on 651 pages for 'entity framework 4'.

Page 19/651 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Entity Framework Generic Repository Error

    - by Jeff Ancel
    I am trying to create a very generic generics repository for my Entity Framework repository that has the basic CRUD statements and uses an Interface. I have hit a brick wall head first and been knocked over. Here is my code, written in a console application, using a Entity Framework Model, with a table named Hurl. Simply trying to pull back the object by its ID. Here is the full application code. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.Objects; using System.Linq.Expressions; using System.Reflection; using System.Data.Objects.DataClasses; namespace GenericsPlay { class Program { static void Main(string[] args) { var hs = new HurlRepository(new hurladminEntity()); var hurl = hs.Load<Hurl>(h => h.Id == 1); Console.Write(hurl.ShortUrl); Console.ReadLine(); } } public interface IHurlRepository { T Load<T>(Expression<Func<T, bool>> expression); } public class HurlRepository : IHurlRepository, IDisposable { private ObjectContext _objectContext; public HurlRepository(ObjectContext objectContext) { _objectContext = objectContext; } public ObjectContext ObjectContext { get { return _objectContext; } } private Type GetBaseType(Type type) { Type baseType = type.BaseType; if (baseType != null && baseType != typeof(EntityObject)) { return GetBaseType(type.BaseType); } return type; } private bool HasBaseType(Type type, out Type baseType) { Type originalType = type.GetType(); baseType = GetBaseType(type); return baseType != originalType; } public IQueryable<T> GetQuery<T>() { Type baseType; if (HasBaseType(typeof(T), out baseType)) { return this.ObjectContext.CreateQuery<T>("[" + baseType.Name.ToString() + "]").OfType<T>(); } else { return this.ObjectContext.CreateQuery<T>("[" + typeof(T).Name.ToString() + "]"); } } public T Load<T>(Expression<Func<T, bool>> whereCondition) { return this.GetQuery<T>().Where(whereCondition).First(); } public void Dispose() { if (_objectContext != null) { _objectContext.Dispose(); } } } } Here is the error that I am getting: System.Data.EntitySqlException was unhandled Message="'Hurl' could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly., near escaped identifier, line 3, column 1." Source="System.Data.Entity" Column=1 ErrorContext="escaped identifier" ErrorDescription="'Hurl' could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly." This is where I am attempting to extract this information from. http://blog.keithpatton.com/2008/05/29/Polymorphic+Repository+For+ADONet+Entity+Framework.aspx

    Read the article

  • Using Joins vs Entity associations

    - by shivesh
    I am learning Entity framework and linq-to-entities. It's possible to get cross values from multiple tables using JOINS (join keyword) or using the navigation fields ( associations) in which case the framework knows how to reference the cross data. My question is what to use when?

    Read the article

  • Entity Framework with large systems - how to divide models?

    - by jkohlhepp
    I'm working with a SQL Server database with 1000+ tables, another few hundred views, and several thousand stored procedures. We are looking to start using Entity Framework for our newer projects, and we are working on our strategy for doing so. The thing I'm hung up on is how best to split the tables into different models (EDMX or DbContext if we go code first). I can think of a few strategies right off the bat: Split by schema We have our tables split across probably a dozen schemas. We could do one model per schema. This isn't perfect, though, because dbo still ends up being very large, with 500+ tables / views. Another problem is that certain units of work will end up having to do transactions that span multiple models, which adds to complexity, although I assume EF makes this fairly straightforward. Split by intent Instead of worrying about schemas, split the models by intent. So we'll have different models for each application, or project, or module, or screen, depending on how granular we want to get. The problem I see with this is that there are certain tables that inevitably have to be used in every case, such as User or AuditHistory. Do we add those to every model (violates DRY I think), or are those in a separate model that is used by every project? Don't split at all - one giant model This is obviously simple from a development perspective but from my research and my intuition this seems like it could perform terribly, both at design time, compile time, and possibly run time. What is the best practice for using EF against such a large database? Specifically what strategies do people use in designing models against this volume of DB objects? Are there options that I'm not thinking of that work better than what I have above? Also, is this a problem in other ORMs such as NHibernate? If so have they come up with any better solutions than EF?

    Read the article

  • iTunes crashes with "Attempt to allocate 1073741824 bytes for NS/CFData failed" error

    - by kubi
    This is a pretty common occurrence. Every two days or so iTunes will crash on me with this error. FYI, 1073741824 is 2^30, which is gigabyte. The crash log is below if you're interested. Process: iTunes [40778] Path: /Applications/iTunes.app/Contents/MacOS/iTunes Identifier: com.apple.iTunes Version: 9.0.1 (9.0.1) Build Info: iTunes-9010901~2 Code Type: X86 (Native) Parent Process: launchd [638] Date/Time: 2009-10-21 11:35:55.159 -0400 OS Version: Mac OS X 10.6.1 (10B504) Report Version: 6 Interval Since Last Report: 38292 sec Per-App Interval Since Last Report: 63956 sec Per-App Crashes Since Last Report: 1 Anonymous UUID: A7149D8A-1161-4740-976B-DB99AE1B01DD Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000002, 0x0000000000000000 Crashed Thread: 13 Application Specific Information: *** Terminating app due to uncaught exception 'NSMallocException', reason: 'Attempt to allocate 1073741824 bytes for NS/CFData failed' *** Call stack at first throw: ( 0 CoreFoundation 0x9924958a __raiseError + 410 1 libobjc.A.dylib 0x9440df49 objc_exception_throw + 56 2 Foundation 0x945e2fda _NSSearchForNameInPath + 0 3 CoreFoundation 0x99262ca5 __CFDataHandleOutOfMemory + 101 4 CoreFoundation 0x9919f27d __CFDataGrow + 717 5 CoreFoundation 0x9919ce0a CFDataReplaceBytes + 362 6 CoreFoundation 0x9919e63a CFDataAppendBytes + 154 7 iTunes 0x00522808 0x0 + 5384200 8 iTunes 0x00523471 0x0 + 5387377 9 iTunes 0x00441bc8 0x0 + 4463560 10 CoreFoundation 0x9923eba3 _signalEventSync + 99 11 CoreFoundation 0x9923f58e _cfstream_solo_signalEventSync + 126 12 CoreFoundation 0x9923f4d7 CFReadStreamSignalEvent + 39 13 CFNetwork 0x97374c23 _ZN14HTTPReadStream11streamEventEm + 169 14 CoreFoundation 0x9923eba3 _signalEventSync + 99 15 CoreFoundation 0x9923eb1a _cfstream_shared_signalEventSync + 458 16 CoreFoundation 0x991b58cb __CFRunLoopDoSources0 + 1563 17 CoreFoundation 0x991b385f __CFRunLoopRun + 1071 18 CoreFoundation 0x991b2d34 CFRunLoopRunSpecific + 452 19 CoreFoundation 0x991b87a4 CFRunLoopRun + 84 20 iTunes 0x0000ade8 0x0 + 44520 21 libSystem.B.dylib 0x96de9f39 _pthread_start + 345 22 libSystem.B.dylib 0x96de9dbe thread_start + 34 ) Thread 0: Dispatch queue: com.apple.main-thread 0 libSystem.B.dylib 0x96dbc7da mach_msg_trap + 10 1 libSystem.B.dylib 0x96dbcf47 mach_msg + 68 2 com.apple.CoreFoundation 0x991b3dbf __CFRunLoopRun + 2447 3 com.apple.CoreFoundation 0x991b2d34 CFRunLoopRunSpecific + 452 4 com.apple.CoreFoundation 0x991b2b61 CFRunLoopRunInMode + 97 5 com.apple.HIToolbox 0x97c3bfec RunCurrentEventLoopInMode + 392 6 com.apple.HIToolbox 0x97c3bda3 ReceiveNextEventCommon + 354 7 com.apple.HIToolbox 0x97dc3d91 ReceiveNextEvent + 83 8 com.apple.iTunes 0x00135fae 0x1000 + 1265582 9 com.apple.HIToolbox 0x97c0f129 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1567 10 com.apple.HIToolbox 0x97c0e3f0 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 411 11 com.apple.HIToolbox 0x97c0e24f SendEventToEventTargetWithOptions + 58 12 com.apple.HIToolbox 0x97c42c0c ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 3006 13 com.apple.HIToolbox 0x97c0f57a DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2672 14 com.apple.HIToolbox 0x97c0e3f0 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 411 15 com.apple.HIToolbox 0x97c30a81 SendEventToEventTarget + 52 16 com.apple.HIToolbox 0x97db98f7 ToolboxEventDispatcher + 86 17 com.apple.HIToolbox 0x97db9a2f RunApplicationEventLoop + 243 18 com.apple.iTunes 0x00135d84 0x1000 + 1265028 19 com.apple.iTunes 0x00135c70 0x1000 + 1264752 20 com.apple.iTunes 0x0000d2af 0x1000 + 49839 21 com.apple.iTunes 0x000049a8 0x1000 + 14760 22 com.apple.iTunes 0x00002bfb 0x1000 + 7163 23 com.apple.iTunes 0x00002b29 0x1000 + 6953 Thread 1: Dispatch queue: com.apple.libdispatch-manager 0 libSystem.B.dylib 0x96de303a kevent + 10 1 libSystem.B.dylib 0x96de3768 _dispatch_mgr_invoke + 215 2 libSystem.B.dylib 0x96de2bf9 _dispatch_queue_invoke + 183 3 libSystem.B.dylib 0x96de298a _dispatch_worker_thread2 + 234 4 libSystem.B.dylib 0x96de2401 _pthread_wqthread + 390 5 libSystem.B.dylib 0x96de2246 start_wqthread + 30 Thread 2: 0 libSystem.B.dylib 0x96dbc7da mach_msg_trap + 10 1 libSystem.B.dylib 0x96dbcf47 mach_msg + 68 2 com.apple.CoreFoundation 0x991b3dbf __CFRunLoopRun + 2447 3 com.apple.CoreFoundation 0x991b2d34 CFRunLoopRunSpecific + 452 4 com.apple.CoreFoundation 0x991b87a4 CFRunLoopRun + 84 5 com.apple.iTunes 0x0000ade8 0x1000 + 40424 6 libSystem.B.dylib 0x96de9f39 _pthread_start + 345 7 libSystem.B.dylib 0x96de9dbe thread_start + 34 Thread 3: 0 libSystem.B.dylib 0x96ddb756 select$DARWIN_EXTSN + 10 1 com.apple.CoreFoundation 0x991f304d __CFSocketManager + 1085 2 libSystem.B.dylib 0x96de9f39 _pthread_start + 345 3 libSystem.B.dylib 0x96de9dbe thread_start + 34 Thread 4: 0 libSystem.B.dylib 0x96e84766 accept$NOCANCEL$UNIX2003 + 10 1 libSystem.B.dylib 0x96e8363e accept + 32 2 com.apple.iTunes 0x0044c792 0x1000 + 4503442 3 com.apple.iTunes 0x004a86cd 0x1000 + 4880077 4 com.apple.iTunes 0x004a879b 0x1000 + 4880283 5 libSystem.B.dylib 0x96de9f39 _pthread_start + 345 6 libSystem.B.dylib 0x96de9dbe thread_start + 34 Thread 5: 0 libSystem.B.dylib 0x96e84766 accept$NOCANCEL$UNIX2003 + 10 1 libSystem.B.dylib 0x96e8363e accept + 32 2 com.apple.iTunes 0x0044c792 0x1000 + 4503442 3 com.apple.iTunes 0x004a86cd 0x1000 + 4880077 4 com.apple.iTunes 0x004a879b 0x1000 + 4880283 5 libSystem.B.dylib 0x96de9f39 _pthread_start + 345 6 libSystem.B.dylib 0x96de9dbe thread_start + 34 Thread 6: 0 libSystem.B.dylib 0x96dbc7da mach_msg_trap + 10 1 libSystem.B.dylib 0x96dbcf47 mach_msg + 68 2 com.apple.CoreFoundation 0x991b3dbf __CFRunLoopRun + 2447 3 com.apple.CoreFoundation 0x991b2d34 CFRunLoopRunSpecific + 452 4 com.apple.CoreFoundation 0x991b87a4 CFRunLoopRun + 84 5 com.apple.iTunes 0x00135e09 0x1000 + 1265161 6 com.apple.iTunes 0x00135cc5 0x1000 + 1264837 7 libSystem.B.dylib 0x96de9f39 _pthread_start + 345 8 libSystem.B.dylib 0x96de9dbe thread_start + 34 Thread 7: 0 libSystem.B.dylib 0x96dbc7da mach_msg_trap + 10 1 libSystem.B.dylib 0x96dbcf47 mach_msg + 68 2 com.apple.CoreFoundation 0x991b3dbf __CFRunLoopRun + 2447 3 com.apple.CoreFoundation 0x991b2d34 CFRunLoopRunSpecific + 452 4 com.apple.CoreFoundation 0x991b87a4 CFRunLoopRun + 84 5 com.apple.iTunes 0x0000ade8 0x1000 + 40424 6 libSystem.B.dylib 0x96de9f39 _pthread_start + 345 7 libSystem.B.dylib 0x96de9dbe thread_start + 34 Thread 8: 0 libSystem.B.dylib 0x96dbc83a semaphore_timedwait_signal_trap + 10 1 libSystem.B.dylib 0x96dea3c1 _pthread_cond_wait + 1066 2 libSystem.B.dylib 0x96e19208 pthread_cond_timedwait_relative_np + 47 3 com.apple.iTunes 0x0004ca83 0x1000 + 309891 4 com.apple.iTunes 0x0004c7cb 0x1000 + 309195 5 com.apple.iTunes 0x0004c76a 0x1000 + 309098 6 com.apple.iTunes 0x0004c5bb 0x1000 + 308667 7 libSystem.B.dylib 0x96de9f39 _pthread_start + 345 8 libSystem.B.dylib 0x96de9dbe thread_start + 34 Thread 9: 0 libSystem.B.dylib 0x96dbc7da mach_msg_trap + 10 1 libSystem.B.dylib 0x96dbcf47 mach_msg + 68 2 com.apple.CoreFoundation 0x991b3dbf __CFRunLoopRun + 2447 3 com.apple.CoreFoundation 0x991b2d34 CFRunLoopRunSpecific + 452 4 com.apple.CoreFoundation 0x991b87a4 CFRunLoopRun + 84 5 com.apple.iTunes 0x0000ade8 0x1000 + 40424 6 libSystem.B.dylib 0x96de9f39 _pthread_start + 345 7 libSystem.B.dylib 0x96de9dbe thread_start + 34 Thread 10: 0 libSystem.B.dylib 0x96dbc7da mach_msg_trap + 10 1 libSystem.B.dylib 0x96dbcf47 mach_msg + 68 2 com.apple.CoreFoundation 0x991b3dbf __CFRunLoopRun + 2447 3 com.apple.CoreFoundation 0x991b2d34 CFRunLoopRunSpecific + 452 4 com.apple.CoreFoundation 0x991b87a4 CFRunLoopRun + 84 5 com.apple.iTunes 0x0000ade8 0x1000 + 40424 6 libSystem.B.dylib 0x96de9f39 _pthread_start + 345 7 libSystem.B.dylib 0x96de9dbe thread_start + 34 Thread 11: 0 libSystem.B.dylib 0x96dbc7da mach_msg_trap + 10 1 libSystem.B.dylib 0x96dbcf47 mach_msg + 68 2 com.apple.CoreFoundation 0x991b3dbf __CFRunLoopRun + 2447 3 com.apple.CoreFoundation 0x991b2d34 CFRunLoopRunSpecific + 452 4 com.apple.CoreFoundation 0x991b87a4 CFRunLoopRun + 84 5 com.apple.iTunes 0x0000ade8 0x1000 + 40424 6 libSystem.B.dylib 0x96de9f39 _pthread_start + 345 7 libSystem.B.dylib 0x96de9dbe thread_start + 34 Thread 12: 0 libSystem.B.dylib 0x96dbc822 semaphore_wait_signal_trap + 10 1 libSystem.B.dylib 0x96dea3d8 _pthread_cond_wait + 1089 2 libSystem.B.dylib 0x96e3370f pthread_cond_wait + 48 3 com.apple.iTunes 0x0000ae70 0x1000 + 40560 4 com.apple.iTunes 0x0000ad06 0x1000 + 40198 5 com.apple.iTunes 0x004418a1 0x1000 + 4458657 6 com.apple.iTunes 0x0043f960 0x1000 + 4450656 7 com.apple.iTunes 0x00525475 0x1000 + 5391477 8 com.apple.iTunes 0x00525c0d 0x1000 + 5393421 9 com.apple.iTunes 0x0004c62c 0x1000 + 308780 10 libSystem.B.dylib 0x96de9f39 _pthread_start + 345 11 libSystem.B.dylib 0x96de9dbe thread_start + 34 Thread 13 Crashed: 0 com.apple.CoreFoundation 0x99293b07 ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ + 7 1 libobjc.A.dylib 0x9440df49 objc_exception_throw + 56 2 com.apple.CoreFoundation 0x991b2fbc CFRunLoopRunSpecific + 1100 3 com.apple.CoreFoundation 0x991b87a4 CFRunLoopRun + 84 4 com.apple.iTunes 0x0000ade8 0x1000 + 40424 5 libSystem.B.dylib 0x96de9f39 _pthread_start + 345 6 libSystem.B.dylib 0x96de9dbe thread_start + 34 Thread 14: 0 libSystem.B.dylib 0x96dbc7da mach_msg_trap + 10 1 libSystem.B.dylib 0x96dbcf47 mach_msg + 68 2 com.apple.CoreFoundation 0x991b3dbf __CFRunLoopRun + 2447 3 com.apple.CoreFoundation 0x991b2d34 CFRunLoopRunSpecific + 452 4 com.apple.CoreFoundation 0x991b87a4 CFRunLoopRun + 84 5 com.apple.iTunes 0x0000ade8 0x1000 + 40424 6 libSystem.B.dylib 0x96de9f39 _pthread_start + 345 7 libSystem.B.dylib 0x96de9dbe thread_start + 34 Thread 15: 0 libSystem.B.dylib 0x96dbc822 semaphore_wait_signal_trap + 10 1 libSystem.B.dylib 0x96dea3d8 _pthread_cond_wait + 1089 2 libSystem.B.dylib 0x96e3370f pthread_cond_wait + 48 3 ...ickTimeComponents.component 0x915275b7 jpegdecompress_MPLoop + 79 4 libSystem.B.dylib 0x96de9f39 _pthread_start + 345 5 libSystem.B.dylib 0x96de9dbe thread_start + 34 Thread 16: 0 libSystem.B.dylib 0x96dbc822 semaphore_wait_signal_trap + 10 1 libSystem.B.dylib 0x96dea3d8 _pthread_cond_wait + 1089 2 libSystem.B.dylib 0x96e3370f pthread_cond_wait + 48 3 com.apple.iTunes 0x00025d27 0x1000 + 150823 4 com.apple.iTunes 0x00025237 0x1000 + 148023 5 libSystem.B.dylib 0x96de9f39 _pthread_start + 345 6 libSystem.B.dylib 0x96de9dbe thread_start + 34 Thread 17: 0 libSystem.B.dylib 0x96de2092 __workq_kernreturn + 10 1 libSystem.B.dylib 0x96de2628 _pthread_wqthread + 941 2 libSystem.B.dylib 0x96de2246 start_wqthread + 30 Thread 18: 0 libSystem.B.dylib 0x96dbc83a semaphore_timedwait_signal_trap + 10 1 libSystem.B.dylib 0x96dea3c1 _pthread_cond_wait + 1066 2 libSystem.B.dylib 0x96e19208 pthread_cond_timedwait_relative_np + 47 3 com.apple.iTunes 0x0004ca83 0x1000 + 309891 4 com.apple.iTunes 0x0004c7cb 0x1000 + 309195 5 com.apple.iTunes 0x0004c76a 0x1000 + 309098 6 com.apple.iTunes 0x0004c5bb 0x1000 + 308667 7 libSystem.B.dylib 0x96de9f39 _pthread_start + 345 8 libSystem.B.dylib 0x96de9dbe thread_start + 34 Thread 13 crashed with X86 Thread State (32-bit): eax: 0x00000000 ebx: 0x9440df25 ecx: 0xb08b2000 edx: 0x0000003b edi: 0xa0737ab0 esi: 0x19685e20 ebp: 0xb08b1de8 esp: 0xb08b1dd0 ss: 0x0000001f efl: 0x00000282 eip: 0x99293b07 cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x0000001f gs: 0x00000037 cr2: 0x00ff9000 Binary Images: 0x1000 - 0xbd9ff8 com.apple.iTunes 9.0.1 (9.0.1) <18B3F1D1-1E3E-6DD1-CB52-F346ACB01921> /Applications/iTunes.app/Contents/MacOS/iTunes 0xdf9000 - 0xe01ff7 com.apple.ipodsynchronization 3.0 (116) <B41B2240-34E9-4A5E-A210-F02D99E3C00E> /System/Library/PrivateFrameworks/iPodSync.framework/Versions/A/iPodSync 0xe09000 - 0xe0eff7 com.apple.iPod 1.6 (17) <4CCD2720-D270-C0D2-1E14-1374779C2401> /System/Library/PrivateFrameworks/iPod.framework/Versions/A/iPod 0xe14000 - 0xe9bfe3 com.apple.iTunes.iPodUpdater 9.0 (9.0) <474ED35C-EDCE-1FEB-AC8C-075B806977A8> /Applications/iTunes.app/Contents/Frameworks/iPodUpdater.framework/Versions/A/iPodUpdater 0xee7000 - 0xf27ff7 com.apple.vmutils 4.2 (106) <834EA6B0-C91B-4CF1-ED3C-229C26459578> /System/Library/PrivateFrameworks/vmutils.framework/Versions/A/vmutils 0x14be000 - 0x14beff7 libmx.A.dylib ??? (???) <01401BF8-3FC7-19CF-ACCE-0F292BFD2F25> /usr/lib/libmx.A.dylib 0x14d0000 - 0x14d0ff7 +net.sourceforge.SafariAdBlockLoader 0.4.0 RC3 (0.4.0 RC3) <8E9A6641-9CE7-5416-DC84-883DB8BAFDDA> /Library/InputManagers/Safari AdBlock/Safari AdBlock Loader.bundle/Contents/MacOS/Safari AdBlock Loader 0x15f8000 - 0x15f9ff7 com.apple.textencoding.unicode 2.3 (2.3) <78A61FD5-70EE-19EA-48D4-3481C640B70D> /System/Library/TextEncodings/Unicode Encodings.bundle/Contents/MacOS/Unicode Encodings 0x1778000 - 0x179efff libssl.0.9.7.dylib ??? (???) <8BF98B2F-0F55-40CA-C082-43C76707BD24> /usr/lib/libssl.0.9.7.dylib 0x17e6000 - 0x17eaff3 com.apple.audio.AudioIPCPlugIn 1.1.0 (1.1.0) <39CD9296-183C-5603-94A4-0A0EC327BA69> /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn 0x17ef000 - 0x17f4ffb com.apple.audio.AppleHDAHALPlugIn 1.7.4 (1.7.4a1) <B4217DD8-4BDE-CC1C-70FF-06EA901F376D> /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn 0x12800000 - 0x138eaff7 com.apple.CoreFP 1.5.18 (1.5) <740FE25C-0539-AEFF-2108-C2C0D338CDCE> /System/Library/PrivateFrameworks/CoreFP.framework/CoreFP 0x1390f000 - 0x139c4fe7 libcrypto.0.9.7.dylib ??? (???) <4917E4F2-817F-5AC4-3FBE-54BC96360448> /usr/lib/libcrypto.0.9.7.dylib 0x13a0a000 - 0x13a50ff3 com.apple.mobiledevice 251.6 (251.6) <E998830A-CFBF-3060-4770-1089AED68444> /System/Library/PrivateFrameworks/MobileDevice.framework/MobileDevice 0x167f5000 - 0x167f7ff7 com.apple.PDFImporter 2.1 (???) <C78368B0-3712-067C-9467-55932890C979> /System/Library/Components/PDFImporter.component/Contents/MacOS/PDFImporter 0x16900000 - 0x16905ff7 com.apple.QuartzComposer.iTunesPlugIn 1.2 (16) <8511A037-AFDE-5D1A-67DA-1B4837432D85> /Library/iTunes/iTunes Plug-ins/Quartz Composer Visualizer.bundle/Contents/MacOS/Quartz Composer Visualizer 0x17fa8000 - 0x181cbfe7 com.apple.audio.codecs.Components 2.0 (2.0) <064E9181-38CC-C2D3-070D-4D162D2903E8> /System/Library/Components/AudioCodecs.component/Contents/MacOS/AudioCodecs 0x18764000 - 0x1877efc3 com.apple.AppleIntermediateCodec 1.2 (145) /Library/QuickTime/AppleIntermediateCodec.component/Contents/MacOS/AppleIntermediateCodec 0x18783000 - 0x18788ff7 com.apple.AppleMPEG2Codec 1.0.1 (220) <6FDFF3C8-7ECE-CB74-1374-9C0230C54F78> /Library/QuickTime/AppleMPEG2Codec.component/Contents/MacOS/AppleMPEG2Codec 0x19137000 - 0x1918cfef com.apple.AppleProResDecoder 2.0 (223) <793BA98A-2E7D-1C39-998D-805B60034DF4> /System/Library/QuickTime/AppleProResDecoder.component/Contents/MacOS/AppleProResDecoder 0x191c4000 - 0x191ddfe7 com.apple.applepixletvideo 1.2.19 (1.2d19) <4A68731C-8071-6CF5-012C-40F00CD1333A> /System/Library/QuickTime/ApplePixletVideo.component/Contents/MacOS/ApplePixletVideo 0x19400000 - 0x19479fef com.apple.AppleVAH264HW.component 2.0 (1.0) <FFC0DED4-1AA1-267E-CE43-0261727DA31D> /System/Library/QuickTime/AppleVAH264HW.component/Contents/MacOS/AppleVAH264HW 0x1953b000 - 0x19577fe3 com.apple.QuickTimeFireWireDV.component 7.6.3 (1584) <8E3D38A3-1005-305C-7B70-D400AB4AC0F3> /System/Library/QuickTime/QuickTimeFireWireDV.component/Contents/MacOS/QuickTimeFireWireDV 0x1a000000 - 0x1a312fe0 +org.perian.Perian 1.1.4 (1.1.4) <577A3B05-0FF7-FC3D-3223-88718A00D84C> /Library/QuickTime/Perian.component/Contents/MacOS/Perian 0x70000000 - 0x700cbfe7 com.apple.audio.units.Components 1.6 (1.6) <A568FC6D-1D2D-A04B-FD1A-AFF6E326E020> /System/Library/Components/CoreAudio.component/Contents/MacOS/CoreAudio 0x8fe00000 - 0x8fe4162b dyld 132.1 (???) <211AF0DD-42D9-79C8-BB6A-1F4BEEF4B4AB> /usr/lib/dyld 0x900cb000 - 0x900ccff7 com.apple.audio.units.AudioUnit 1.6 (1.6) <68180B96-381C-A09D-5576-606A134FD953> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x900cd000 - 0x908b2fe7 com.apple.WebCore 6531 (6531.9) <F9A9848B-9EB0-B912-49F5-7E8010AF2CF1> /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore 0x908b3000 - 0x908effff com.apple.CoreMediaIOServices 101.0 (715) <FD86FB28-9BA1-0993-1172-F10F61EA6344> /System/Library/PrivateFrameworks/CoreMediaIOServices.framework/Versions/A/CoreMediaIOServices 0x9095f000 - 0x90970ff7 com.apple.LangAnalysis 1.6.5 (1.6.5) <E77440D0-76EE-EB4C-3D00-9EDE417F13CF> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis 0x909ba000 - 0x90bb7feb com.apple.AddressBook.framework 5.0 (862) <BD05B213-46CF-8EFD-B801-CF741408600D> /System/Library/Frameworks/AddressBook.framework/Versions/A/AddressBook 0x90bd9000 - 0x90c03ff7 com.apple.shortcut 1.1 (1.1) <B0514FA9-7CAE-AD94-93CA-7B2A2C5F7B8A> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x90c04000 - 0x90c23fe7 com.apple.opencl 11 (11) <372A42E7-FB10-B74D-E1A0-980E94D07021> /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL 0x90c24000 - 0x90c24ff7 com.apple.Accelerate 1.5 (Accelerate 1.5) <F642E7A0-3720-FA19-0190-E6DBD9EF2D9B> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x90c25000 - 0x90c25ff7 com.apple.ApplicationServices 38 (38) <8012B504-3D83-BFBB-DA65-065E061CFE03> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices 0x90d7c000 - 0x90db6fe7 libFontRegistry.dylib ??? (???) <EE633CF6-8827-EF05-10A4-5F2937120227> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib 0x90db7000 - 0x91d45ff7 com.apple.QuickTimeComponents.component 7.6.3 (1584) /System/Library/QuickTime/QuickTimeComponents.component/Contents/MacOS/QuickTimeComponents 0x91d46000 - 0x91d7cfff libtidy.A.dylib ??? (???) <DDFAB560-3883-A6A2-7BDD-D91730982B48> /usr/lib/libtidy.A.dylib 0x91d8d000 - 0x91d92ff7 com.apple.OpenDirectory 10.6 (10.6) <92582807-E8F3-3DD9-EB42-4195CFB754A1> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory 0x91d93000 - 0x91d9aff7 com.apple.agl 3.0.12 (AGL-3.0.12) <6BF89127-C18C-27A9-F94A-981836A822FE> /System/Library/Frameworks/AGL.framework/Versions/A/AGL 0x91d9b000 - 0x91ddbff3 com.apple.securityinterface 4.0 (36981) <F024C5CA-0762-1599-5BAB-17F785E51075> /System/Library/Frameworks/SecurityInterface.framework/Versions/A/SecurityInterface 0x91e0d000 - 0x91e5dfe7 libGLU.dylib ??? (???) <55A69DCE-1237-341E-F239-CDFE1F5B19BB> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib 0x91e5e000 - 0x91ee0ffb SecurityFoundation ??? (???) <29C27E0E-B2B3-BF6B-B1F8-5783B8B01535> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation 0x91f28000 - 0x9235dff7 libLAPACK.dylib ??? (???) <5E2D2283-57DE-9A49-1DB0-CD027FEFA6C2> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib 0x9236b000 - 0x9237ffe7 libbsm.0.dylib ??? (???) <14CB053A-7C47-96DA-E415-0906BA1B78C9> /usr/lib/libbsm.0.dylib 0x923bb000 - 0x924e4fe7 com.apple.audio.toolbox.AudioToolbox 1.6 (1.6) <62BEEBE6-68FC-4A48-91CF-39DA2BD793F1> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x924fe000 - 0x925b0ffb libFontParser.dylib ??? (???) <EB089832-660F-0B34-3AC8-CCDA937987D9> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib 0x9264d000 - 0x9264fff7 libRadiance.dylib ??? (???) <0E03CF64-0931-7B9A-F617-4387B809D6D8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x92650000 - 0x92696ff7 libauto.dylib ??? (???) <FAB17F30-A28B-E33D-6E21-C7119C9C83ED> /usr/lib/libauto.dylib 0x92697000 - 0x928c2ff3 com.apple.QuartzComposer 4.0 (156.6) <D1D3A5A8-75BC-4556-85FA-8A9F487106DD> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzComposer.framework/Versions/A/QuartzComposer 0x928c3000 - 0x92913ff7 com.apple.framework.familycontrols 2.0 (2.0) <50617342-E578-4C1C-938A-19A37ECA91CA> /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/FamilyControls 0x92914000 - 0x92c0dfef com.apple.QuickTime 7.6.3 (1584) <687233E1-F428-5224-08D5-5874BEA2300D> /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime 0x92c22000 - 0x92d62ff7 com.apple.syncservices 5.0 (575) <61B36E07-6D14-97DC-122F-41EDE1F6DB03> /System/Library/Frameworks/SyncServices.framework/Versions/A/SyncServices 0x92d6e000 - 0x92d9fff3 libTrueTypeScaler.dylib ??? (???) <F326E053-7425-2F10-F883-CBD56A1E1B72> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libTrueTypeScaler.dylib 0x92da0000 - 0x92dc0fe7 libresolv.9.dylib ??? (???) <A48921CB-3FA7-3071-AF9C-2D86FB493A3A> /usr/lib/libresolv.9.dylib 0x92dca000 - 0x92ed7ff7 com.apple.MediaToolbox 0.420.17 (420.17) <EE843140-C79F-3D8C-B89E-893CD74C3633> /System/Library/PrivateFrameworks/MediaToolbox.framework/Versions/A/MediaToolbox 0x92f4a000 - 0x92ff9fe3 com.apple.QuickTimeImporters.component 7.6.3 (1584) <34BF4FBA-BFCD-9A47-4BA9-E2B155C5C881> /System/Library/QuickTime/QuickTimeImporters.component/Contents/MacOS/QuickTimeImporters 0x92ffa000 - 0x930a9fef com.apple.ColorSync 4.6.0 (4.6.0) <66ABAE86-B0EC-D641-913D-08ACA965F9FA> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync 0x930aa000 - 0x931a0ff7 libGLProgrammability.dylib ??? (???) <B8E40851-3A01-7D01-2F96-537BF7FA63B5> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgrammability.dylib 0x931a8000 - 0x93200fe7 com.apple.datadetectorscore 2.0 (80.7) <A40AA74A-9D13-2A6C-5440-B50905923251> /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore 0x93201000 - 0x93228ff7 com.apple.quartzfilters 1.6.0 (1.6.0) <879A3B93-87A6-88FE-305D-DF1EAED04756> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzFilters.framework/Versions/A/QuartzFilters 0x93229000 - 0x9327aff7 com.apple.HIServices 1.8.0 (???) <B8EC13DB-A81A-91BF-8C82-66E840C64C91> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices 0x9327b000 - 0x932b6fe7 com.apple.DebugSymbols 1.1 (70) <05013716-CFCF-801E-5535-D0643869BDCD> /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols 0x932b7000 - 0x93304feb com.apple.DirectoryService.PasswordServerFramework 6.0 (6.0) <BF66BA5D-BBC8-78A5-DBE2-F9DE3DD1D775> /System/Library/PrivateFrameworks/PasswordServer.framework/Versions/A/PasswordServer 0x93305000 - 0x93319ffb com.apple.speech.synthesis.framework 3.10.35 (3.10.35) <57DD5458-4F24-DA7D-0927-C3321A65D743> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x9331a000 - 0x9335eff3 com.apple.coreui 0.2 (112) <A810DFFD-6314-5E2B-93A4-D5626634B1EE> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x9335f000 - 0x93418fe7 libsqlite3.dylib ??? (???) <16CEF8E8-8C9A-94CD-EF5D-05477844C005> /usr/lib/libsqlite3.dylib 0x93419000 - 0x93473ff7 com.apple.framework.IOKit 2.0 (???) <7618DDEC-2E3B-9C6E-FDC9-15169E24B4FB> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x93474000 - 0x934edff3 com.apple.audio.CoreAudio 3.2.0 (3.2) <91AE891E-6015-AABE-3512-2D5EBCA0937B> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x934ee000 - 0x935effe7 libxml2.2.dylib ??? (???) <C242A74D-280A-90C3-3F79-891624AA45D2> /usr/lib/libxml2.2.dylib 0x935f0000 - 0x93634fe7 com.apple.Metadata 10.6.0 (507.1) <CBD1B22B-5F10-C784-03A2-35106B97DF3F> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata 0x93635000 - 0x93637ff7 com.apple.QuickTimeH264.component 7.6.3 (1584) /System/Library/QuickTime/QuickTimeH264.component/Contents/MacOS/QuickTimeH264 0x93639000 - 0x93654ff7 libPng.dylib ??? (???) <38DD4AA1-0643-85A0-F2F5-EE9269729975> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x93655000 - 0x936affe7 com.apple.CorePDF 1.0 (1.0) <590244C9-15D7-7A65-13AF-6F597123746B> /System/Library/PrivateFrameworks/CorePDF.framework/Versions/A/CorePDF 0x936b0000 - 0x936e8ff7 com.apple.LDAPFramework 2.0 (120.1) <8C7F3F42-6A4D-D37A-4232-685D44E8769E> /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP 0x93723000 - 0x93757ff7 libcups.2.dylib ??? (???) <9078BA07-DEE1-6597-D15D-7BE3A20CB5A0> /usr/lib/libcups.2.dylib 0x93758000 - 0x93758ff7 liblangid.dylib ??? (???) <B99607FC-5646-32C8-2C16-AFB5EA9097C2> /usr/lib/liblangid.dylib 0x93759000 - 0x9375cffb com.apple.help 1.3.1 (41) <67F1F424-3983-7A2A-EC21-867BE838E90B> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help 0x9375d000 - 0x937d4feb com.apple.backup.framework 1.1 (1.0) <73C642BD-

    Read the article

  • Problem setting up Zend Framework to run with Netbeans

    - by Starx
    I am trying to get Zend Framework working with netbeans, but every time there is the error "php.exe"' is not recognized as an internal or external command, operable program or batch file. I am using WAMP server 2.0 it is installed in e:\wamp My Zend framework is inside e:\wamp\www\ZendFramework-1.10.5 I have located the ZendFramework script as: E:\wamp\www\ZendFramework-1.10.5\bin\zf.bat I am also registered the module. What am i doing wrong? I am running on Windows 7 32 bit, using NETbean 6.9 RC1

    Read the article

  • Entity Framework Code-First, OData & Windows Phone Client

    - by Jon Galloway
    Entity Framework Code-First is the coolest thing since sliced bread, Windows  Phone is the hottest thing since Tickle-Me-Elmo and OData is just too great to ignore. As part of the Full Stack project, we wanted to put them together, which turns out to be pretty easy… once you know how.   EF Code-First CTP5 is available now and there should be very few breaking changes in the release edition, which is due early in 2011.  Note: EF Code-First evolved rapidly and many of the existing documents and blog posts which were written with earlier versions, may now be obsolete or at least misleading.   Code-First? With traditional Entity Framework you start with a database and from that you generate “entities” – classes that bridge between the relational database and your object oriented program. With Code-First (Magic-Unicorn) (see Hanselman’s write up and this later write up by Scott Guthrie) the Entity Framework looks at classes you created and says “if I had created these classes, the database would have to have looked like this…” and creates the database for you! By deriving your entity collections from DbSet and exposing them via a class that derives from DbContext, you "turn on" database backing for your POCO with a minimum of code and no hidden designer or configuration files. POCO == Plain Old CLR Objects Your entity objects can be used throughout your applications - in web applications, console applications, Silverlight and Windows Phone applications, etc. In our case, we'll want to read and update data from a Windows Phone client application, so we'll expose the entities through a DataService and hook the Windows Phone client application to that data via proxies.  Piece of Pie.  Easy as cake. The Demo Architecture To see this at work, we’ll create an ASP.NET/MVC application which will act as the host for our Data Service.  We’ll create an incredibly simple data layer using EF Code-First on top of SQLCE4 and we’ll expose the data in a WCF Data Service using the oData protocol.  Our Windows Phone 7 client will instantiate  the data context via a URI and load the data asynchronously. Setting up the Server project with MVC 3, EF Code First, and SQL CE 4 Create a new application of type ASP.NET MVC 3 and name it DeadSimpleServer.  We need to add the latest SQLCE4 and Entity Framework Code First CTP's to our project. Fortunately, NuGet makes that really easy. Open the Package Manager Console (View / Other Windows / Package Manager Console) and type in "Install-Package EFCodeFirst.SqlServerCompact" at the PM> command prompt. Since NuGet handles dependencies for you, you'll see that it installs everything you need to use Entity Framework Code First in your project. PM> install-package EFCodeFirst.SqlServerCompact 'SQLCE (= 4.0.8435.1)' not installed. Attempting to retrieve dependency from source... Done 'EFCodeFirst (= 0.8)' not installed. Attempting to retrieve dependency from source... Done 'WebActivator (= 1.0.0.0)' not installed. Attempting to retrieve dependency from source... Done You are downloading SQLCE from Microsoft, the license agreement to which is available at http://173.203.67.148/licenses/SQLCE/EULA_ENU.rtf. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device. Successfully installed 'SQLCE 4.0.8435.1' You are downloading EFCodeFirst from Microsoft, the license agreement to which is available at http://go.microsoft.com/fwlink/?LinkID=206497. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device. Successfully installed 'EFCodeFirst 0.8' Successfully installed 'WebActivator 1.0.0.0' You are downloading EFCodeFirst.SqlServerCompact from Microsoft, the license agreement to which is available at http://173.203.67.148/licenses/SQLCE/EULA_ENU.rtf. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device. Successfully installed 'EFCodeFirst.SqlServerCompact 0.8' Successfully added 'SQLCE 4.0.8435.1' to EfCodeFirst-CTP5 Successfully added 'EFCodeFirst 0.8' to EfCodeFirst-CTP5 Successfully added 'WebActivator 1.0.0.0' to EfCodeFirst-CTP5 Successfully added 'EFCodeFirst.SqlServerCompact 0.8' to EfCodeFirst-CTP5 Note: We're using SQLCE 4 with Entity Framework here because they work really well together from a development scenario, but you can of course use Entity Framework Code First with other databases supported by Entity framework. Creating The Model using EF Code First Now we can create our model class. Right-click the Models folder and select Add/Class. Name the Class Person.cs and add the following code: using System.Data.Entity; namespace DeadSimpleServer.Models { public class Person { public int ID { get; set; } public string Name { get; set; } } public class PersonContext : DbContext { public DbSet<Person> People { get; set; } } } Notice that the entity class Person has no special interfaces or base class. There's nothing special needed to make it work - it's just a POCO. The context we'll use to access the entities in the application is called PersonContext, but you could name it anything you wanted. The important thing is that it inherits DbContext and contains one or more DbSet which holds our entity collections. Adding Seed Data We need some testing data to expose from our service. The simplest way to get that into our database is to modify the CreateCeDatabaseIfNotExists class in AppStart_SQLCEEntityFramework.cs by adding some seed data to the Seed method: protected virtual void Seed( TContext context ) { var personContext = context as PersonContext; personContext.People.Add( new Person { ID = 1, Name = "George Washington" } ); personContext.People.Add( new Person { ID = 2, Name = "John Adams" } ); personContext.People.Add( new Person { ID = 3, Name = "Thomas Jefferson" } ); personContext.SaveChanges(); } The CreateCeDatabaseIfNotExists class name is pretty self-explanatory - when our DbContext is accessed and the database isn't found, a new one will be created and populated with the data in the Seed method. There's one more step to make that work - we need to uncomment a line in the Start method at the top of of the AppStart_SQLCEEntityFramework class and set the context name, as shown here, public static class AppStart_SQLCEEntityFramework { public static void Start() { DbDatabase.DefaultConnectionFactory = new SqlCeConnectionFactory("System.Data.SqlServerCe.4.0"); // Sets the default database initialization code for working with Sql Server Compact databases // Uncomment this line and replace CONTEXT_NAME with the name of your DbContext if you are // using your DbContext to create and manage your database DbDatabase.SetInitializer(new CreateCeDatabaseIfNotExists<PersonContext>()); } } Now our database and entity framework are set up, so we can expose data via WCF Data Services. Note: This is a bare-bones implementation with no administration screens. If you'd like to see how those are added, check out The Full Stack screencast series. Creating the oData Service using WCF Data Services Add a new WCF Data Service to the project (right-click the project / Add New Item / Web / WCF Data Service). We’ll be exposing all the data as read/write.  Remember to reconfigure to control and minimize access as appropriate for your own application. Open the code behind for your service. In our case, the service was called PersonTestDataService.svc so the code behind class file is PersonTestDataService.svc.cs. using System.Data.Services; using System.Data.Services.Common; using System.ServiceModel; using DeadSimpleServer.Models; namespace DeadSimpleServer { [ServiceBehavior( IncludeExceptionDetailInFaults = true )] public class PersonTestDataService : DataService<PersonContext> { // This method is called only once to initialize service-wide policies. public static void InitializeService( DataServiceConfiguration config ) { config.SetEntitySetAccessRule( "*", EntitySetRights.All ); config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2; config.UseVerboseErrors = true; } } } We're enabling a few additional settings to make it easier to debug if you run into trouble. The ServiceBehavior attribute is set to include exception details in faults, and we're using verbose errors. You can remove both of these when your service is working, as your public production service shouldn't be revealing exception information. You can view the output of the service by running the application and browsing to http://localhost:[portnumber]/PersonTestDataService.svc/: <service xml:base="http://localhost:49786/PersonTestDataService.svc/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app"> <workspace> <atom:title>Default</atom:title> <collection href="People"> <atom:title>People</atom:title> </collection> </workspace> </service> This indicates that the service exposes one collection, which is accessible by browsing to http://localhost:[portnumber]/PersonTestDataService.svc/People <?xml version="1.0" encoding="iso-8859-1" standalone="yes"?> <feed xml:base=http://localhost:49786/PersonTestDataService.svc/ xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> <title type="text">People</title> <id>http://localhost:49786/PersonTestDataService.svc/People</id> <updated>2010-12-29T01:01:50Z</updated> <link rel="self" title="People" href="People" /> <entry> <id>http://localhost:49786/PersonTestDataService.svc/People(1)</id> <title type="text"></title> <updated>2010-12-29T01:01:50Z</updated> <author> <name /> </author> <link rel="edit" title="Person" href="People(1)" /> <category term="DeadSimpleServer.Models.Person" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /> <content type="application/xml"> <m:properties> <d:ID m:type="Edm.Int32">1</d:ID> <d:Name>George Washington</d:Name> </m:properties> </content> </entry> <entry> ... </entry> </feed> Let's recap what we've done so far. But enough with services and XML - let's get this into our Windows Phone client application. Creating the DataServiceContext for the Client Use the latest DataSvcUtil.exe from http://odata.codeplex.com. As of today, that's in this download: http://odata.codeplex.com/releases/view/54698 You need to run it with a few options: /uri - This will point to the service URI. In this case, it's http://localhost:59342/PersonTestDataService.svc  Pick up the port number from your running server (e.g., the server formerly known as Cassini). /out - This is the DataServiceContext class that will be generated. You can name it whatever you'd like. /Version - should be set to 2.0 /DataServiceCollection - Include this flag to generate collections derived from the DataServiceCollection base, which brings in all the ObservableCollection goodness that handles your INotifyPropertyChanged events for you. Here's the console session from when we ran it: <ListBox x:Name="MainListBox" Margin="0,0,-12,0" ItemsSource="{Binding}" SelectionChanged="MainListBox_SelectionChanged"> Next, to keep things simple, change the Binding on the two TextBlocks within the DataTemplate to Name and ID, <ListBox x:Name="MainListBox" Margin="0,0,-12,0" ItemsSource="{Binding}" SelectionChanged="MainListBox_SelectionChanged"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Margin="0,0,0,17" Width="432"> <TextBlock Text="{Binding Name}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" /> <TextBlock Text="{Binding ID}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}" /> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> Getting The Context In the code-behind you’ll first declare a member variable to hold the context from the Entity Framework. This is named using convention over configuration. The db type is Person and the context is of type PersonContext, You initialize it by providing the URI, in this case using the URL obtained from the Cassini web server, PersonContext context = new PersonContext( new Uri( "http://localhost:49786/PersonTestDataService.svc/" ) ); Create a second member variable of type DataServiceCollection<Person> but do not initialize it, DataServiceCollection<Person> people; In the constructor you’ll initialize the DataServiceCollection using the PersonContext, public MainPage() { InitializeComponent(); people = new DataServiceCollection<Person>( context ); Finally, you’ll load the people collection using the LoadAsync method, passing in the fully specified URI for the People collection in the web service, people.LoadAsync( new Uri( "http://localhost:49786/PersonTestDataService.svc/People" ) ); Note that this method runs asynchronously and when it is finished the people  collection is already populated. Thus, since we didn’t need or want to override any of the behavior we don’t implement the LoadCompleted. You can use the LoadCompleted event if you need to do any other UI updates, but you don't need to. The final code is as shown below: using System; using System.Data.Services.Client; using System.Windows; using System.Windows.Controls; using DeadSimpleServer.Models; using Microsoft.Phone.Controls; namespace WindowsPhoneODataTest { public partial class MainPage : PhoneApplicationPage { PersonContext context = new PersonContext( new Uri( "http://localhost:49786/PersonTestDataService.svc/" ) ); DataServiceCollection<Person> people; // Constructor public MainPage() { InitializeComponent(); // Set the data context of the listbox control to the sample data // DataContext = App.ViewModel; people = new DataServiceCollection<Person>( context ); people.LoadAsync( new Uri( "http://localhost:49786/PersonTestDataService.svc/People" ) ); DataContext = people; this.Loaded += new RoutedEventHandler( MainPage_Loaded ); } // Handle selection changed on ListBox private void MainListBox_SelectionChanged( object sender, SelectionChangedEventArgs e ) { // If selected index is -1 (no selection) do nothing if ( MainListBox.SelectedIndex == -1 ) return; // Navigate to the new page NavigationService.Navigate( new Uri( "/DetailsPage.xaml?selectedItem=" + MainListBox.SelectedIndex, UriKind.Relative ) ); // Reset selected index to -1 (no selection) MainListBox.SelectedIndex = -1; } // Load data for the ViewModel Items private void MainPage_Loaded( object sender, RoutedEventArgs e ) { if ( !App.ViewModel.IsDataLoaded ) { App.ViewModel.LoadData(); } } } } With people populated we can set it as the DataContext and run the application; you’ll find that the Name and ID are displayed in the list on the Mainpage. Here's how the pieces in the client fit together: Complete source code available here

    Read the article

  • Microsoft Silverlight Analytics Framework - Day 2 Part 2 of MIX 2010

    - by GeekAgilistMercenary
    I went to the session on Microsoft Silverlight Analytics Framework (MSAF) today while here at MIX 2010.  It was a great walk through the features, ideas, and what the end goal is.  Michael Scherotter did a great job of lining up the ideas, intentions, and the functional ideas behind the framework. The framework is built around the Silverlight Behaviors.  If you aren't sure what behaviors are, check out these entries from Nikhilk.net Silverlight Behaviors, Silverlight 3 Drag Behavior, An Introduction to Behaviors, Triggers, and Actions, and of course the MSDN Documentation on the matter. Some of the key features of the framework is to support out-of-browser scenarios, which works perfectly with out Webtrends DX Web Services.  Offline scenarios, which again, we have worked toward supporting at Webtrends DC Web Services via caching and other criteria as needed.  Another feature that I was really stoked about is the Microsoft Expression Blend integration that removes the need for coding, thus simplifying the addition of analytics components based on events or other actions within a Silverlight Application.  This framework also easily supports A/B Testing (again, something we do quit a bit of at Webtrends with Webtrends Optimize. The last thing I really wanted to point out was the control support that this framework has support in already from Telerik RadControls, Smooth Streaming Media Element, and Microsoft Silverlight Media Framework Player 1.0.  These are implemented with behaviors and handlers exposed via MEF (Managed Extensibility Framework). All in all, great second day, great analytics framework for Silverlight, and great presentation.  Until tomorrow, adieu. For this original entry and all sorts of other technical gibberish I write, check out my other blog Agilist Mercenary.

    Read the article

  • Apress Deal of the Day - 22/Feb/2010 - Entity Framework 4.0 Recipes: A Problem-Solution Approach

    - by TATWORTH
    Todays $10 deal from Apress at  http://www.apress.com/info/dailydeal is "Entity Framework 4.0 Recipes: A Problem-Solution Approach" Whilst I am still wary of using the Entity framework and I would caution against its use for updates in financial systems, unless you use a technique such as you can find on pages 509-512 of this book. This book is very impressive as I found the answer to this in about 2 minutes from the time I downloaded the e-book. Entity Framework 4.0 Recipes: A Problem-Solution Approach With this book, you will learn the core concepts of Entity Framework through a broad range of clear and concise solutions to everyday data access tasks. Armed with this experience, you will be ready to dive deep into Entity Framework, experiment with new approaches, and develop ways to solve even the most difficult data access challenges. $49.99 | Published May 2010 | Larry Tenny

    Read the article

  • How do you handle objects that need custom behavior, and need to exist as an entity in the database?

    - by Scott Whitlock
    For a simple example, assume your application sends out notifications to users when various events happen. So in the database I might have the following tables: TABLE Event EventId uniqueidentifier EventName varchar TABLE User UserId uniqueidentifier Name varchar TABLE EventSubscription EventUserId EventId UserId The events themselves are generated by the program. So there are hard-coded points in the application where an event instance is generated, and it needs to notify all the subscribed users. So, the application itself doesn't edit the Event table, except during initial installation, and during an update where a new Event might be created. At some point, when an event is generated, the application needs to lookup the Event and get a list of Users. What's the best way to link the event in the source code to the event in the database? Option 1: Store the EventName in the program as a fixed constant, and look it up by name. Option 2: Store the EventId in the program as a static Guid, and look it up by ID. Extra Credit In other similar circumstances I may want to include custom behavior with the event type. That is, I'll want subclasses of my Event entity class with different behaviors, and when I lookup an event, I want it to return an instance of my subclass. For instance: class Event { public Guid Id { get; } public Guid EventName { get; } public ReadOnlyCollection<EventSubscription> EventSubscriptions { get; } public void NotifySubscribers() { foreach(var eventSubscription in EventSubscriptions) { eventSubscription.Notify(); } this.OnSubscribersNotified(); } public virtual void OnSubscribersNotified() {} } class WakingEvent : Event { private readonly IWaker waker; public WakingEvent(IWaker waker) { if(waker == null) throw new ArgumentNullException("waker"); this.waker = waker; } public override void OnSubscribersNotified() { this.waker.Wake(); base.OnSubscribersNotified(); } } So, that means I need to map WakingEvent to whatever key I'm using to look it up in the database. Let's say that's the EventId. Where do I store this relationship? Does it go in the event repository class? Should the WakingEvent know declare its own ID in a static member or method? ...and then, is this all backwards? If all events have a subclass, then instead of retrieving events by ID, should I be asking my repository for the WakingEvent like this: public T GetEvent<T>() where T : Event { ... // what goes here? ... } I can't be the first one to tackle this. What's the best practice?

    Read the article

  • Repository Pattern with Entity Framework 3.5 and MVVM

    - by Ravi
    I am developing a Database File System. I am using - .Net framework 3.5 Entity Framework 3.5 WPF with MVVM pattern The project spans across multiple assemblies each using same model. One assembly,let's call it a "server", only adds data to the database using EF i.e. same model.Other assemblies (including the UI) both reads and writes the data.The changes made by server should immediately reflect in other assemblies. The database contains self referencing tables where each entity can have single OR no parent and (may be) some children. I want to use repository pattern which can also provide some mechanism to handle this hierarchical nature. I have already done reading on this on Code Project. It shares the same context(entities) everywhere. My question is - Should I share the same context everywhere? What are the advantages and disadvantages of doing that?

    Read the article

  • Entity framework MappingException: The type 'XXX has been mapped more than once

    - by Michal
    Hi everyone, I'm using Entity framework in web application. ObjectContext is created per request (using HttpContext), hereby code: string ocKey = "ocm_" + HttpContext.Current.GetHashCode().ToString(); if (!HttpContext.Current.Items.Contains(ocKey)) { HttpContext.Current.Items.Add(ocKey, new ElevationEntityModel(EFConnectionString)); } _eem = HttpContext.Current.Items[ocKey] as ElevationEntityModel; Not every time, but sometimes I have this exception: System.Data.MappingException was unhandled by user code Message=The type 'XXX' has been mapped more than once. Source=System.Data.Entity I'm absolutely confused and I don't have any idea what can caused this problem. Can anybody help me? Thanks.

    Read the article

  • Repository Pattern with Entity Framework 3.5

    - by Ravi
    I am developing a Database File System. I am using - .Net framework 3.5 Entity Framework 3.5 WPF with MVVM pattern The project spans across multiple assemblies each using same model. One assembly,let's call it a "server", only adds data to the database using EF i.e. same model.Other assemblies (including the UI) both reads and writes the data.The changes made by server should immediately reflect in other assemblies. The database contains self referencing tables where each entity can have single OR no parent and (may be) some children. I want to use repository pattern which can also provide some mechanism to handle this hierarchical nature. I have already done reading on this on Code Project. It shares the same context(entities) everywhere. My question is - Should I share the same context everywhere? What are the advantages and disadvantages of doing that?

    Read the article

  • Repository Pattern with Entity Framework 3.5

    - by Ravi
    I am developing a Database File System. I am using - .Net framework 3.5 Entity Framework 3.5 WPF with MVVM pattern The project spans across multiple assemblies each using same model. One assembly,let's call it a "server", only adds data to the database using EF i.e. same model.Other assemblies (including the UI) both reads and writes the data.The changes made by server should immediately reflect in other assemblies. The database contains self referencing tables where each entity can have single OR no parent and (may be) some children. I want to use repository pattern which can also provide some mechanism to handle this hierarchical nature. I have already done reading on this on Code Project. It shares the same context(entities) everywhere. My question is - Should I share the same context everywhere? What are the advantages and disadvantages of doing that?

    Read the article

  • Entity framework createquery question.

    - by Tony Heflin
    I am trying to create a generic search form to use in an EF app. I want to be ably to specify the entity to query at runtime below is a simplified version of the code. cx is the contect object, valuelists is the entity in question. 1: Dim q As String = "select c from intactentities.valuelists as c" 2: Dim x = cx.CreateQuery(Of ValueLists)(q) 3: TextBox1.Text = x.Count This works but I need to remove the hardcoded reference to valuelists in line 3. I expect I am overlooking something simple can anyone suggest a simple solution? Thanks Tony

    Read the article

  • insert and modify a record in an entity using Core Data

    - by aminfar
    I tried to find the answer of my question on the internet, but I could not. I have a simple entity in Core data that has a Value attribute (that is integer) and a Date attribute. I want to define two methods in my .m file. First method is the ADD method. It takes two arguments: an integer value (entered by user in UI) and a date (current date by default). and then insert a record into the entity based on the arguments. Second method is like an increment method. It uses the Date as a key to find a record and then increment the integer value of that record. I don't know how to write these methods. (assume that we have an Array Controller for the table in the xib file)

    Read the article

  • Using Repository and Unit of Work patterns with Entity Framework 4.0 and MVC 2

    - by Mr. D
    Hi, I'm following this article Using Repository and Unit of Work patterns with Entity Framework 4.0. I'm tying to implement the Repository and Unit of work pattern, using Asp.Net MVC 2 and Entity Framework 4. Please let me know if I'm doing it right... In the Models folder: Northwind.edmx Products.cs (POCO class) ProductRepository.cs (Did my product query) IProductRepository.cs NorthwindContext.cs IUnitOfWork.cs In the Controller folder: ProductController.cs (Retrieve from ProductRepository.cs and Pass it to the view) When I run the application, I'm getting error message: Mapping and metadata information could not be found for EntityType 'NorthwindMvcPoco.Models.Category'. I don't know what I'm doing wrong. I search through whole web and I couldn't resolve this issue. Please help me.

    Read the article

  • Generating Entity Keys

    - by David Veeneman
    I have run into my first dissapointment with Entity Framework 4. It turns out that SQL CE, when used with EF4, does not support autogenerated primary keys. I get a System.Data.UpdateException from OnjectContext.SaveChanges() with this message: Server-generated keys and server-generated values are not supported by SQL Server Compact. So, now I have to manually generate keys for my entities. Assuming I want to use auto-incremented integer keys, what is the best way to go about generating and keeping track of the keys when using Entity Framework? Thanks for your help.

    Read the article

  • Entity Framework - Medium Trust

    - by Echilon
    I'm trying to get the entity framework working in medium trust. I've tried splitting the files and using a separate assembly but I seem to have one problem after another. I moved the EDMX to a separate assembly, which causes a single .dll to be outpit to the sites /Bin directory. I'm referencing this as below from web.config. Whenever I try to access one of the entity classes, I get an ArgumentException: 'An item with the same key has already been added.' It's critical this works with medium trust, but I seem to be running out of options. Any advice greatly appreciated.

    Read the article

  • Entity Frameworks 4 - Changing the model does not update the T4 self tracking template files

    - by Darren
    I am using self tracking entities and have moved the entity classes to another assembly by using 'Add as link' to point to the TT file as mentioned here. Now though, when I update the model (for instance change a property name) the template is not automatically run and so the entity class does not get updated. I can of course manually run the template to get the updates, but it would be easier if it ran automatically in the way it did before I moved the classes. Is there any way to achieve this? Darren.

    Read the article

  • insert and mofigy a record in an entity using Core Data

    - by aminfar
    I tried to find the answer of my question on the internet, but I could not. I have a simple entity in Core data that has a Value attribute (that is integer) and a Date attribute. I want to define two methods in my .m file. First method is the ADD method. It takes two arguments: an integer value (entered by user in UI) and a date (current date by default). and then insert a record into the entity based on the arguments. Second method is like an increment method. It uses the Date as a key to find a record and then increment the integer value of that record. I don't know how to write these methods. (assume that we have an Array Controller for the table in the xib file)

    Read the article

  • Generate Entity Data Model from Data Contract

    - by CSmooth.net
    I would like to find a fast way to convert a Data Contract to a Entity Data Model. Consider the following Data Contract: [DataContract] class PigeonHouse { [DataMember] public string housename; [DataMember] public List<Pigeon> pigeons; } [DataContract] class Pigeon { [DataMember] public string name; [DataMember] public int numberOfWings; [DataMember] public int age; } Is there an easy way to create an ADO.NET Entity Data Model from this code?

    Read the article

  • Entity Framework Performance Problem

    - by Steve Horn
    I'm hoping that someone can help me understand how to overcome a performance problem I'm running into with the latest version of the Entity Framework. In my test, I created my model from a database consisting of around 80 tables. The problem that I'm running into is that the cost of the very first query I run on a thread is very expensive. If I run without pre-compiling views the first query takes anywhere from 5800 to 6600 milliseconds. If I pre-compile the views (see this article) I can get the initial query cost down to about 2800 to 3200 milliseconds. 3 seconds for each request is still unacceptable for my needs. Subsequent queries are very fast. Can you please help me understand how to eliminate the poor performance of the initial query? I'm using the version of entity framework that ships with Visual Studio 2010 RC.

    Read the article

  • VS2010 MVC and Entity Framework Model in Separate Project

    - by mdm
    Hi, I am trying to use an Entity Framework Model (in separate project) into an asp.net 4 MVC project (VS2010, C#) If I create the EF inside the MVC project I have no problems. I think I am missing some step. things done: 1. added reference to the EF class project 2. added connection string in MVC web.config 3. added reference to System.Data.Entity in both web.config and project references Now i can use the model only if I copy the .edmx file to the Models folder, but in this way the EF project is not external anymore. What am I missing? Thank you in advance.

    Read the article

  • [Java] Form data transition into entity beans to persist them by the server side ORM

    - by cscsaba242
    Hello guys, Is there any good explanation or tutorial which describes the common way how can we create entity beans from the received data of the form ? The main reason of my question the treating the received ids (e.g id of country,city and so forth) which is the way from the id to entity ? Example: ................Client side form username:String countryid:Integer (could be a drop down) ................Server side entities public class UserBean { String username; CountryBean Country; } public class CountryBean { String cityname; Integer id; } ............................................ Maybe the question is dependent of the used technology, but I guess there is a very common way. I would like to comprehend the conventional approach of this problem. (For the sake of the completeness I would like to save the form data (received by Stripes) by JPA) Thanks advance. cscsaba242

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >