using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.Text; using System.Web.Mvc; using Weee.Models; using Weee.Service; namespace Weee.WCFService { // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "WCFFabService" in code, svc and config file together. // NOTE: In order to launch WCF Test Client for testing this service, please select WCFFabService.svc or WCFFabService.svc.cs at the Solution Explorer and start debugging. public class WCFFabService : IWCFFabService { private readonly WeeeFabDataService service; public WCFFabService() { service = DependencyResolver.Current.GetService(); service.DisableProxyAndLazyLoad(); } public void DoWork() { } public IEnumerable GetFabs(string authId) { service.Initialize(authId); return service.GetFabs(); } public Fab SaveFab(Fab toBeSave, string authId) { service.Initialize(authId); return service.SaveFab(toBeSave); } } }