This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using BrokersWeb.Search.Domain; | |
using NHibernate; | |
using NHibernate.Criterion; | |
using System.Linq; | |
namespace BrokersWeb.Search.Data{ | |
public class NhSearchListingQuery : ISearchListingQuery{ | |
public NhSearchListingQuery(ISessionFactory factory){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DelegateComponentLoader : ILazyComponentLoader | |
{ | |
public DelegateComponentLoader(Func<Context, IRegistration> action) | |
{ | |
this.action = action; | |
} | |
public IRegistration Load(string key, Type service); | |
{ | |
return action(new Context(key, service)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using NHibernate.Cfg.MappingSchema; | |
namespace NHibernate.Cfg | |
{ | |
public static class HqlConfigurationExtensions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using HqlIntellisense.ConfigurationAbstraction; | |
namespace HQLAddin.ConfigurationInspector | |
{ | |
public class DynamicMapper | |
{ | |
public static IEnumerable<IPersistentClassInformation> GetClasses(dynamic configuration) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VisualBrush x:Key="WavyBrush" Viewbox="0,0,3,3" ViewboxUnits="Absolute" Viewport="0,-1,6,4" ViewportUnits="Absolute" TileMode="Tile"> | |
<VisualBrush.Visual> | |
<Path Stroke="Red" StrokeThickness="0.5"> | |
<Path.Data> | |
<PathGeometry Figures="M 0.1,1 C 1,0 2,2 3,1" /> <!-- How can I translate this to c# ? --> | |
</Path.Data> | |
</Path> | |
</VisualBrush.Visual> | |
</VisualBrush> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IErrorList | |
{ | |
void AddError(string message); | |
} | |
[Export(typeof(IErrorList)), PartCreationPolicy(CreationPolicy.Shared)] | |
public class ErrorList : IErrorList | |
{ | |
private static readonly Guid ProviderGuid = new Guid("A97E9FD2-1974-4889-8B3C-D4410164A229"); | |
private ErrorListProvider backProvider; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT TOP (@p0) | |
FROM (, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) AS __hibernate_sort_row | |
SELECT p.ProjectID AS ProjectID27_0_ , | |
p.CompanyID AS CompanyID27_0_ , | |
p.LabID AS LabID27_0_ , | |
p.ProjectTitle AS ProjectT4_27_0_, | |
p.CreatedBy AS CreatedBy27_0_ , | |
p.CreateDate AS CreateDate27_0_, | |
p.Description AS Descript7_27_0_, | |
p.AbstractPlainText AS Abstract8_27_0_, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
container.Register(Component.For<IServiceLocator>().AsFactory()); | |
ServiceLocator.SetLocatorProvider(() => container.GetService<IServiceLocator>()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Ahora pensa en esta | |
var q = from c in categories | |
join p in products on c equals p.Category into ps | |
select new { Category = c, MaxQuantity = ps.Max(p => p.Quantity), ProductsCount = ps.Count() }; | |
sin join: | |
//Forma sin join | |
var q = from c in categories |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Option 1 | |
public class Service : IDisposable | |
{ | |
public Service (IConnectionProvider connectionProvider) | |
{ | |
this.connection = connectionProvider.CreateConnection(); | |
} | |
public void Dispose() | |
{ |