Beispiel #1
0
        public async Task Add(TextItemType textItemType)
        {
            await this.ExecuteInContextAsync(async dbContext =>
            {
                var entity = new Entities.TextItemType()
                {
                    GUID = textItemType.Identity.Value,
                    Name = textItemType.Name,
                };

                dbContext.Add(entity);

                await dbContext.SaveChangesAsync();
            });
        }
Beispiel #2
0
        public async Task <TextItemTypeIdentity> New()
        {
            var textItemTypeIdentity = TextItemTypeIdentity.New();

            await this.ExecuteInContextAsync(async dbContext =>
            {
                var entity = new Entities.TextItemType()
                {
                    GUID = textItemTypeIdentity.Value,
                };

                dbContext.Add(entity);

                await dbContext.SaveChangesAsync();
            });

            return(textItemTypeIdentity);
        }