Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/MongoFramework/Attributes/MappingAdapterAttribute.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Runtime.InteropServices;
using MongoFramework.Infrastructure.Mapping;

namespace MongoFramework.Attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace MongoFramework.Attributes
{
[AttributeUsage(AttributeTargets.Class )]
[AttributeUsage(AttributeTargets.Class)]
public class RuntimeTypeDiscoveryAttribute : Attribute
{

Expand Down
4 changes: 2 additions & 2 deletions src/MongoFramework/Bson/BsonDiff.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using MongoDB.Bson;
using System;
using System;
using System.Linq;
using MongoDB.Bson;

namespace MongoFramework.Bson
{
Expand Down
2 changes: 1 addition & 1 deletion src/MongoFramework/IMongoDbBucketSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace MongoFramework
{
public interface IMongoDbBucketSet<TGroup, TSubEntity> : IMongoDbSet, IQueryable<EntityBucket<TGroup, TSubEntity>>
public interface IMongoDbBucketSet<TGroup, TSubEntity> : IMongoDbSet, IQueryable<EntityBucket<TGroup, TSubEntity>>
where TGroup : class
where TSubEntity : class
{
Expand Down
3 changes: 1 addition & 2 deletions src/MongoFramework/IMongoDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Threading;
using System.Threading.Tasks;
using MongoFramework.Infrastructure;
using MongoFramework.Infrastructure.Commands;

namespace MongoFramework
{
Expand All @@ -19,7 +18,7 @@ public interface IMongoDbContext

void SaveChanges();
Task SaveChangesAsync(CancellationToken cancellationToken = default(CancellationToken));

void Attach<TEntity>(TEntity entity) where TEntity : class;
void AttachRange<TEntity>(IEnumerable<TEntity> entities) where TEntity : class;
}
Expand Down
8 changes: 4 additions & 4 deletions src/MongoFramework/IMongoDbTenantSet.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Linq;

namespace MongoFramework
{
namespace MongoFramework
{
public interface IMongoDbTenantSet<TEntity> : IMongoDbSet<TEntity> where TEntity : class
{
new IMongoDbTenantContext Context { get; }
IQueryable<TEntity> GetSearchTextQueryable(string search);
}
}
}
}
6 changes: 1 addition & 5 deletions src/MongoFramework/IndexType.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace MongoFramework
namespace MongoFramework
{
public enum IndexType
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public IEnumerable<WriteModel<TEntity>> GetModel(WriteModelOptions options)
Validator.ValidateObject(entity, validationContext);

var definition = EntityMapping.GetOrCreateDefinition(typeof(TEntity));
var updateDefintion = UpdateDefinitionHelper.CreateFromDiff<TEntity>(EntityEntry.OriginalValues, EntityEntry.CurrentValues);
yield return new UpdateOneModel<TEntity>(definition.CreateIdFilterFromEntity(entity), updateDefintion);
var updateDefinition = UpdateDefinitionHelper.CreateFromDiff<TEntity>(EntityEntry.OriginalValues, EntityEntry.CurrentValues);
yield return new UpdateOneModel<TEntity>(definition.CreateIdFilterFromEntity(entity), updateDefinition);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using MongoDB.Bson;
using System.Linq;
using MongoDB.Bson;
using MongoDB.Driver;
using System.Linq;

namespace MongoFramework.Infrastructure.DefinitionHelpers
{
Expand All @@ -17,7 +17,7 @@ private static void ApplyDiffUpdate(BsonDocument updateDefinition, string name,
var documentAProperties = documentA?.Names ?? Enumerable.Empty<string>();
var documentBProperties = documentB?.Names ?? Enumerable.Empty<string>();
var propertyNames = documentAProperties.Union(documentBProperties);

var baseName = name;
if (!string.IsNullOrEmpty(baseName))
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using MongoDB.Driver;
using MongoFramework.Infrastructure.Linq;

namespace MongoFramework.Infrastructure.Diagnostics
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MongoDB.Driver;
using MongoFramework.Infrastructure.Linq;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using MongoFramework.Infrastructure.Diagnostics;
using System;
using System;

namespace MongoFramework.Infrastructure.Diagnostics
{
public interface IDiagnosticListener : IObserver<DiagnosticCommand>
{

}
}
4 changes: 1 addition & 3 deletions src/MongoFramework/Infrastructure/EntityCommandStaging.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.Generic;
using MongoFramework.Infrastructure.Commands;

namespace MongoFramework.Infrastructure
Expand Down
10 changes: 5 additions & 5 deletions src/MongoFramework/Infrastructure/EntityCommandWriter.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using MongoDB.Driver;
using MongoFramework.Infrastructure.Commands;
using MongoFramework.Infrastructure.Diagnostics;
using MongoFramework.Infrastructure.Mapping;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using MongoDB.Driver;
using MongoFramework.Infrastructure.Commands;
using MongoFramework.Infrastructure.Diagnostics;
using MongoFramework.Infrastructure.Mapping;

namespace MongoFramework.Infrastructure
{
Expand Down
Loading