Ejemplo n.º 1
0
        int IBlogService.CreateEntry(DataContract.Entry entry)
        {
			var entity = new Entity.Entry()
			{
				Content = entry.Content,
				Name = entry.Title,
				Id = new Random().Next(1000)
			};
			return entity.Id;
        }
Ejemplo n.º 2
0
		void IBlogService.AddEntry(int blogId, DataContract.Entry entry)
		{
			var entryEntity = new Entity.Entry()
			{
				Name = entry.Title,
				Content = entry.Content,
				//BlogId = blogId
			};
			if (_repository.Query<Entity.Blog>().Where(x => x.Id == blogId).Any())
			{
				_repository.Persist(entryEntity);
			}
		}